feat(nvim): various plugins and small configuration details

This commit is contained in:
2024-10-08 22:13:42 +01:00
parent 53bd697bf9
commit dfdd45f1e2
5 changed files with 25 additions and 44 deletions

View File

@ -1,9 +1,9 @@
# MONITOR CONFIG
# monitor=,preferred,auto,1
monitor=,preferred,auto,1
# monitor=,addreserved, 0, 0, 0, 0 # Custom reserved area
# HDMI port: mirror display. To see device name, use `hyprctl monitors`
monitor=HDMI-A-1,2560x1440@144,1920x0,1,mirror,eDP-1
# monitor=HDMI-A-1,2560x1440@144,1920x0,1,mirror,eDP-1
input {
# Keyboard: Add a layout and uncomment kb_options for Win+Space switching shortcut
@ -14,7 +14,7 @@ input {
repeat_rate = 35
touchpad {
natural_scroll = yes
natural_scroll = false
disable_while_typing = true
clickfinger_behavior = true
scroll_factor = 0.5

View File

@ -18,6 +18,13 @@ vim.opt.undofile = true
vim.opt.ignorecase = true
vim.opt.smartcase = true
-- Remove sign column (LSP gutter on the left)
vim.opt.signcolumn = "yes"
-- Line Numbers
vim.opt.number = true
vim.opt.relativenumber = true
-- Modules --
-- Lazy = Package Manager --
@ -60,6 +67,7 @@ vim.keymap.set("n", "<leader>x", "<Cmd>bd<CR>")
local builtin = require("telescope.builtin")
vim.keymap.set("n", "<leader>ff", builtin.find_files, { desc = "Telescope find files" })
vim.keymap.set("n", "<leader>fw", builtin.live_grep, { desc = "Telescope live grep" })
vim.keymap.set("n", "<leader>fb", builtin.buffers, { desc = "Telescope live buffers" })
-- Neo Tree --
vim.keymap.set("n", "<C-n>", "<Cmd> Neotree toggle <CR>")
@ -68,3 +76,7 @@ vim.keymap.set("n", "<leader>e", "<Cmd> Neotree focus <CR>")
-- LSP --
vim.keymap.set("n", "<leader>gd", vim.lsp.buf.definition)
vim.keymap.set("n", "<leader>ca", vim.lsp.buf.code_action)
vim.keymap.set("n", "<leader>lf", vim.diagnostic.open_float)
-- Search --
vim.keymap.set("n", "<ESC>", "<Cmd> noh <CR>")

View File

@ -1,18 +0,0 @@
-- Bootstrap lazy.nvim
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
if vim.v.shell_error ~= 0 then
vim.api.nvim_echo({
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
{ out, "WarningMsg" },
{ "\nPress any key to exit..." },
}, true, {})
vim.fn.getchar()
os.exit(1)
end
end
vim.opt.rtp:prepend(lazypath)
require("lazy").setup("plugins")

View File

@ -1,4 +1,9 @@
return {
{
"windwp/nvim-autopairs",
event = "InsertEnter",
config = true,
},
{ "Everblush/nvim", name = "everblush" },
{ "hrsh7th/vim-vsnip" },
{ "hrsh7th/cmp-nvim-lsp" },
@ -53,7 +58,7 @@ return {
local configs = require("nvim-treesitter.configs")
configs.setup({
ensure_installed = { "lua", "javascript", "typescript", "html", "tsx" },
ensure_installed = { "lua", "javascript", "typescript", "html", "tsx", "zig" },
sync_install = false,
highlight = { enable = true },
indent = { enable = true },
@ -123,6 +128,10 @@ return {
lsp.vtsls.setup({
capabilities = capabilities,
})
lsp.zls.setup({
capabilities = capabilities,
})
end,
},
}

View File

@ -1,22 +0,0 @@
vim.g.mapleader = " "
-- Save --
vim.keymap.set("n", "<C-s>", "<Cmd>w<CR>")
-- Split navigation --
vim.keymap.set("n", "<C-h>", "<C-w>h")
vim.keymap.set("n", "<C-j>", "<C-w>j")
vim.keymap.set("n", "<C-k>", "<C-w>k")
vim.keymap.set("n", "<C-l>", "<C-w>l")
-- Buffers --
vim.keymap.set("n", "<leader>x", "<Cmd>bd<CR>")
-- Telescope Mappings --
local builtin = require("telescope.builtin")
vim.keymap.set("n", "<leader>ff", builtin.find_files, { desc = "Telescope find files" })
vim.keymap.set("n", "<leader>fw", builtin.live_grep, { desc = "Telescope live grep" })
-- Neo Tree --
vim.keymap.set("n", "<C-n>", "<Cmd> Neotree toggle <CR>")
vim.keymap.set("n", "<leader>e", "<Cmd> Neotree focus <CR>")