diff options
Diffstat (limited to 'nvim')
-rw-r--r-- | nvim/.config/nvim/after/ftplugin/qf.lua | 1 | ||||
-rw-r--r-- | nvim/.config/nvim/lua/plugins/treesitter.lua | 5 | ||||
-rw-r--r-- | nvim/.config/nvim/lua/tobyvin/diagnostic.lua | 5 | ||||
-rw-r--r-- | nvim/.config/nvim/lua/tobyvin/keymaps.lua | 9 | ||||
-rw-r--r-- | nvim/.config/nvim/lua/tobyvin/options.lua | 1 |
5 files changed, 10 insertions, 11 deletions
diff --git a/nvim/.config/nvim/after/ftplugin/qf.lua b/nvim/.config/nvim/after/ftplugin/qf.lua new file mode 100644 index 0000000..869505d --- /dev/null +++ b/nvim/.config/nvim/after/ftplugin/qf.lua @@ -0,0 +1 @@ +vim.wo[0][0].scrolloff = 0 diff --git a/nvim/.config/nvim/lua/plugins/treesitter.lua b/nvim/.config/nvim/lua/plugins/treesitter.lua index a8408dd..3a43cf2 100644 --- a/nvim/.config/nvim/lua/plugins/treesitter.lua +++ b/nvim/.config/nvim/lua/plugins/treesitter.lua @@ -54,6 +54,7 @@ local M = { "tsx", "typescript", "vim", + "vimdoc", "vue", "yaml", }, @@ -73,20 +74,16 @@ local M = { goto_next_start = { ["]p"] = "@parameter.inner", ["]f"] = "@function.outer", - ["]]"] = "@class.outer", }, goto_next_end = { ["]F"] = "@function.outer", - ["]["] = "@class.outer", }, goto_previous_start = { ["[p"] = "@parameter.inner", ["[f"] = "@function.outer", - ["[["] = "@class.outer", }, goto_previous_end = { ["[F"] = "@function.outer", - ["[]"] = "@class.outer", }, }, diff --git a/nvim/.config/nvim/lua/tobyvin/diagnostic.lua b/nvim/.config/nvim/lua/tobyvin/diagnostic.lua index 382a470..b81d80d 100644 --- a/nvim/.config/nvim/lua/tobyvin/diagnostic.lua +++ b/nvim/.config/nvim/lua/tobyvin/diagnostic.lua @@ -17,8 +17,3 @@ vim.fn.sign_define("DiagnosticSignError", { text = " ", texthl = "DiagnosticS vim.fn.sign_define("DiagnosticSignWarn", { text = " ", texthl = "DiagnosticSignWarn" }) vim.fn.sign_define("DiagnosticSignInfo", { text = " ", texthl = "DiagnosticSignInfo" }) vim.fn.sign_define("DiagnosticSignHint", { text = " ", texthl = "DiagnosticSignHint" }) - -vim.keymap.set("n", "gl", vim.diagnostic.open_float, { desc = "open diagnostic float" }) -vim.keymap.set("n", "gL", vim.diagnostic.setqflist, { desc = "qf diagnostic" }) -vim.keymap.set("n", "]g", vim.diagnostic.goto_next, { desc = "next diagnostic" }) -vim.keymap.set("n", "[g", vim.diagnostic.goto_prev, { desc = "prev diagnostic" }) diff --git a/nvim/.config/nvim/lua/tobyvin/keymaps.lua b/nvim/.config/nvim/lua/tobyvin/keymaps.lua index 663a017..8637e3c 100644 --- a/nvim/.config/nvim/lua/tobyvin/keymaps.lua +++ b/nvim/.config/nvim/lua/tobyvin/keymaps.lua @@ -1,5 +1,10 @@ -vim.keymap.set("n", "gn", vim.cmd.bnext, { desc = "go to next buffer in the buffer list" }) -vim.keymap.set("n", "gp", vim.cmd.bprevious, { desc = "go to previous buffer in the buffer list" }) +vim.keymap.set("n", "]]", "<CMD>cnext<CR>", { desc = "go to next error" }) +vim.keymap.set("n", "[[", "<CMD>cprev<CR>", { desc = "go to previous error" }) +vim.keymap.set("n", "]b", "<CMD>bnext<CR>", { desc = "go to next buffer in the buffer list" }) +vim.keymap.set("n", "[b", "<CMD>bprev<CR>", { desc = "go to previous buffer in the buffer list" }) +vim.keymap.set("n", "gl", vim.diagnostic.setloclist, { desc = "add buffer diagnostics to loclist" }) +vim.keymap.set("n", "gL", vim.diagnostic.setqflist, { desc = "add all diagnostics to qflist" }) +vim.keymap.set("n", "L", vim.diagnostic.open_float, { desc = "show diagnostics in floating window" }) vim.keymap.set("n", "<a-j>", "<CMD>m +1<CR>", { desc = "move line down" }) vim.keymap.set("n", "<a-k>", "<CMD>m -2<CR>", { desc = "move line up" }) diff --git a/nvim/.config/nvim/lua/tobyvin/options.lua b/nvim/.config/nvim/lua/tobyvin/options.lua index ad19ffd..2cba330 100644 --- a/nvim/.config/nvim/lua/tobyvin/options.lua +++ b/nvim/.config/nvim/lua/tobyvin/options.lua @@ -26,6 +26,7 @@ vim.opt.scrolloff = 10 vim.opt.sessionoptions = { "buffers", "curdir", "folds", "help", "tabpages", "winsize", "winpos" } vim.opt.shiftround = true vim.opt.shiftwidth = 0 +vim.opt.shortmess:append("a") vim.opt.showbreak = string.rep(" ", 3) vim.opt.signcolumn = "yes:1" vim.opt.smartcase = true |