From 36c7a2cc1073660986da3c8cdb469c1e4def2ee0 Mon Sep 17 00:00:00 2001 From: S4NKALP Date: Sun, 18 Feb 2024 21:21:51 +0545 Subject: [PATCH] fix(nvim): disable conflicting keymaps on smooth scrolling extra --- config/nvim/lua/config/keymaps.lua | 1 + config/nvim/lua/config/options.lua | 5 +++++ .../lua/plugins/extras/coding/treesitter/spider.lua | 9 +++++---- config/nvim/lua/plugins/extras/editor/harpoon.lua | 2 +- .../nvim/lua/plugins/extras/editor/package-info.lua | 2 +- .../nvim/lua/plugins/extras/lang/python-extended.lua | 12 ++++++++++++ .../nvim/lua/plugins/extras/ui/smooth-scrolling.lua | 4 ++-- 7 files changed, 27 insertions(+), 8 deletions(-) diff --git a/config/nvim/lua/config/keymaps.lua b/config/nvim/lua/config/keymaps.lua index ad4fa6a6..5356ac1d 100644 --- a/config/nvim/lua/config/keymaps.lua +++ b/config/nvim/lua/config/keymaps.lua @@ -13,6 +13,7 @@ end map("n", "?", searching_brave, { noremap = true, silent = true, desc = "Search current word on brave search" }) -- Lazy options +map("n", "l", "") map("n", "ll", "Lazy", { desc = "Lazy" }) -- stylua: ignore start map("n", "ld", function() vim.fn.system({ "xdg-open", "https://lazyvim.org" }) end, { desc = "LazyVim Docs" }) diff --git a/config/nvim/lua/config/options.lua b/config/nvim/lua/config/options.lua index 91e576a6..90be403e 100644 --- a/config/nvim/lua/config/options.lua +++ b/config/nvim/lua/config/options.lua @@ -20,3 +20,8 @@ o.gui_font_face = "JetBrainsMono Nerd Font" -- Enable EditorConfig integration o.editorconfig = true + +-- Disable some repl providers +for _, provider in ipairs({ "node", "perl", "python3", "ruby" }) do + vim.g["loaded_" .. provider .. "_provider"] = 0 +end diff --git a/config/nvim/lua/plugins/extras/coding/treesitter/spider.lua b/config/nvim/lua/plugins/extras/coding/treesitter/spider.lua index d6cbd8a6..2c243ffb 100644 --- a/config/nvim/lua/plugins/extras/coding/treesitter/spider.lua +++ b/config/nvim/lua/plugins/extras/coding/treesitter/spider.lua @@ -1,10 +1,11 @@ return { "chrisgrieser/nvim-spider", opts = {}, + -- stylua: ignore keys = { - { "w", "lua require('spider').motion('w')", mode = { "n", "o", "x" }, desc = "Spider-w" }, - { "e", "lua require('spider').motion('e')", mode = { "n", "o", "x" }, desc = "Spider-e" }, - { "b", "lua require('spider').motion('b')", mode = { "n", "o", "x" }, desc = "Spider-b" }, - { "E", "lua require('spider').motion('ge')", mode = { "n", "o", "x" }, desc = "Spider-E" }, + { "e", mode = { "n", "o", "x" }, function() require("spider").motion("e") end, desc = "Spider-e" }, + { "w", mode = { "n", "o", "x" }, function() require("spider").motion("w") end, desc = "Spider-w" }, + { "b", mode = { "n", "o", "x" }, function() require("spider").motion("b") end, desc = "Spider-b" }, + { "E", mode = { "n", "x", "o" }, function() require("spider").motion("ge") end, desc = "Spider-E" }, }, } diff --git a/config/nvim/lua/plugins/extras/editor/harpoon.lua b/config/nvim/lua/plugins/extras/editor/harpoon.lua index 7175df07..16ee128b 100644 --- a/config/nvim/lua/plugins/extras/editor/harpoon.lua +++ b/config/nvim/lua/plugins/extras/editor/harpoon.lua @@ -8,7 +8,7 @@ end table.insert(keys, { "ha", function() require("harpoon"):list():append() end, desc = "Add Mark" }) table.insert(keys, { "hh", function() require("harpoon").ui:toggle_quick_menu(require("harpoon"):list()) end, desc = "Menu" }) table.insert(keys, { "hf", "Telescope harpoon marks", desc = "Files (Telescope)" }) -table.insert(keys, { "hc", function() require("harpoon"):list():clear() end, desc = "Clear all Files" }) +table.insert(keys, { "hc", function() require("harpoon"):list():clear() end, desc = "Clear all Files" }) table.insert(keys, { "]H", function() require("harpoon"):list():next() end, desc = "Next Harpoon File" }) table.insert(keys, { "[H", function() require("harpoon"):list():prev() end, desc = "Prev Harpoon File" }) diff --git a/config/nvim/lua/plugins/extras/editor/package-info.lua b/config/nvim/lua/plugins/extras/editor/package-info.lua index 5ace0941..60f02141 100644 --- a/config/nvim/lua/plugins/extras/editor/package-info.lua +++ b/config/nvim/lua/plugins/extras/editor/package-info.lua @@ -20,7 +20,7 @@ return { optional = true, -- stylua: ignore keys = { - { "pp", "FloatermNew --disposable --name=lazynpm --opener=edit --titleposition=center --height=0.85 --width=0.85 --cwd= lazynpm", desc = "Lazynpm", }, + { "pwp", "FloatermNew --disposable --name=lazynpm --opener=edit --titleposition=center --height=0.85 --width=0.85 --cwd= lazynpm", desc = "Lazynpm" }, }, }, { diff --git a/config/nvim/lua/plugins/extras/lang/python-extended.lua b/config/nvim/lua/plugins/extras/lang/python-extended.lua index 0b5d670f..73e25e3f 100644 --- a/config/nvim/lua/plugins/extras/lang/python-extended.lua +++ b/config/nvim/lua/plugins/extras/lang/python-extended.lua @@ -8,6 +8,18 @@ return { return opts end, }, + { + "neovim/nvim-lspconfig", + opts = { + servers = { + ruff_lsp = { + handlers = { + ["textDocument/publishDiagnostics"] = function() end, + }, + }, + }, + }, + }, { "nvim-treesitter/nvim-treesitter", opts = function(_, opts) diff --git a/config/nvim/lua/plugins/extras/ui/smooth-scrolling.lua b/config/nvim/lua/plugins/extras/ui/smooth-scrolling.lua index 00a51aa3..634e31f9 100644 --- a/config/nvim/lua/plugins/extras/ui/smooth-scrolling.lua +++ b/config/nvim/lua/plugins/extras/ui/smooth-scrolling.lua @@ -5,8 +5,8 @@ return { event = "VeryLazy", opts = { default_keymaps = true, - extra_keymaps = true, - extended_keymaps = true, + extra_keymaps = false, + extended_keymaps = false, default_delay = 2, }, }