From 3aaa99288ed6cec9e4c1d982b53b7e725c16ef4c Mon Sep 17 00:00:00 2001 From: Oliver Ladner Date: Tue, 22 Oct 2024 10:46:13 +0200 Subject: [PATCH 1/2] docs: reality check for init.lua --- init.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/init.lua b/init.lua index d47e897..48b28f5 100644 --- a/init.lua +++ b/init.lua @@ -1,17 +1,17 @@ --[[ -My simple Neovim configuration. Made from scratch, inspired by +My simple(TM) Neovim configuration. Made from scratch, inspired by https://www.youtube.com/watch?v=w7i4amO_zaE NOTE: EXTERNAL DEPENDENCIES MACOS - ripgrep (https://github.com/BurntSushi/ripgrep, used by telescope) - fd (https://github.com/sharkdp/fd, used by telescope) -- A Nerd font (https://www.nerdfonts.com/, used by nvim-web-devicons) +- A Nerd font (https://www.nerdfonts.com/, used by various plugins) NOTE: EXTERNAL DEPENDENCIES WINDOWS See https://blog.nikfp.com/how-to-install-and-set-up-neovim-on-windows - ripgrep (https://github.com/BurntSushi/ripgrep, used by telescope) - fd (https://github.com/sharkdp/fd, used by telescope) -- A Nerd font (https://www.nerdfonts.com/, used by nvim-web-devicons) +- A Nerd font (https://www.nerdfonts.com/, used by various plugins) - nodejs-lts (used for npm to install prettier) - then run "npm i -g npm" - zig, wget, unzip, git, fzf From 61a2dbde99000919e76f770bc8ba1a3f762fc6d4 Mon Sep 17 00:00:00 2001 From: Oliver Ladner Date: Thu, 14 Nov 2024 12:03:19 +0100 Subject: [PATCH 2/2] feat: add keybinding to disable diagnostics --- lua/weeheavy/remap.lua | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lua/weeheavy/remap.lua b/lua/weeheavy/remap.lua index 97dfdb0..fd07fd2 100644 --- a/lua/weeheavy/remap.lua +++ b/lua/weeheavy/remap.lua @@ -102,24 +102,29 @@ end, { desc = "Format file or range (in visual mode)" }) -- Toggle zen-mode.nvim vim.keymap.set("n", "z", ":ZenMode") --- Got to next diagnostic item (any severity) +-- Go to next diagnostic item (any severity) vim.keymap.set({ "n", "v" }, "da", function() vim.diagnostic.goto_next({}) vim.api.nvim_feedkeys("zz", "n", false) end, { desc = "Go to next diagnostic" }) --- Got to next diagnostic item (error severity) +-- Go to next diagnostic item (error severity) vim.keymap.set({ "n", "v" }, "de", function() vim.diagnostic.goto_next({ severity = vim.diagnostic.severity.ERROR }) vim.api.nvim_feedkeys("zz", "n", false) end, { desc = "Go to next error diagnostic" }) --- Got to next diagnostic item (warning severity) +-- Go to next diagnostic item (warning severity) vim.keymap.set({ "n", "v" }, "dw", function() vim.diagnostic.goto_next({ severity = vim.diagnostic.severity.WARN }) vim.api.nvim_feedkeys("zz", "n", false) end, { desc = "Go to next warning diagnostic" }) +-- Toggle LSP diagnostics +vim.keymap.set({ "n", "v" }, "dd", function() + vim.diagnostic.enable(not vim.diagnostic.is_enabled()) +end, { desc = "Turn diagnostics on/off" }) + -- Toggle trouble (for document) --vim.keymap.set("n", "qq", ":TroubleToggle") --vim.keymap.set("n", "qq", "Trouble diagnostics toggle")