From f4431f6d75baa71aa23318ea50bea3848f946ab1 Mon Sep 17 00:00:00 2001 From: talha Date: Tue, 23 Apr 2024 00:43:02 +0500 Subject: Migrated to lazy.nvim, added neomake, a few remaps --- after/plugin/harpoon.lua | 8 ++++---- after/plugin/lsp.lua | 6 +----- after/plugin/telescope.lua | 4 ++-- after/plugin/treesitter.lua | 21 --------------------- 4 files changed, 7 insertions(+), 32 deletions(-) delete mode 100644 after/plugin/treesitter.lua (limited to 'after') diff --git a/after/plugin/harpoon.lua b/after/plugin/harpoon.lua index 7d2a7a6..a24b20d 100644 --- a/after/plugin/harpoon.lua +++ b/after/plugin/harpoon.lua @@ -4,7 +4,7 @@ local ui = require("harpoon.ui") vim.keymap.set("n", "a", mark.add_file) vim.keymap.set("n", "", ui.toggle_quick_menu) -vim.keymap.set("n", "y", function() ui.nav_file(1) end) -vim.keymap.set("n", "u", function() ui.nav_file(2) end) -vim.keymap.set("n", "i", function() ui.nav_file(3) end) -vim.keymap.set("n", "o", function() ui.nav_file(4) end) +vim.keymap.set("n", "1", function() ui.nav_file(1) end) +vim.keymap.set("n", "2", function() ui.nav_file(2) end) +vim.keymap.set("n", "3", function() ui.nav_file(3) end) +vim.keymap.set("n", "4", function() ui.nav_file(4) end) diff --git a/after/plugin/lsp.lua b/after/plugin/lsp.lua index f8dae3c..7d8e3ab 100644 --- a/after/plugin/lsp.lua +++ b/after/plugin/lsp.lua @@ -1,10 +1,5 @@ local lsp = require('lsp-zero').preset({}) -local function allow_format(servers) - return function(client) return vim.tbl_contains(servers, client.name) end -end - - -- TODO: add bindings to work when no lsp available, to allow normal functionality lsp.on_attach(function(client, bufnr) -- see :help lsp-zero-keybindings @@ -23,3 +18,4 @@ lsp.on_attach(function(client, bufnr) end) lsp.setup() + diff --git a/after/plugin/telescope.lua b/after/plugin/telescope.lua index 4806008..b007673 100644 --- a/after/plugin/telescope.lua +++ b/after/plugin/telescope.lua @@ -1,6 +1,6 @@ local builtin = require('telescope.builtin') -vim.keymap.set('n', 'pf', builtin.find_files, {}) +vim.keymap.set('n', 'ff', builtin.find_files, {}) vim.keymap.set('n', '', builtin.git_files, {}) -vim.keymap.set('n', 'ps', function() +vim.keymap.set('n', 'fs', function() builtin.grep_string({ search = vim.fn.input("Grep > ") }); end) diff --git a/after/plugin/treesitter.lua b/after/plugin/treesitter.lua deleted file mode 100644 index d0ee3dc..0000000 --- a/after/plugin/treesitter.lua +++ /dev/null @@ -1,21 +0,0 @@ -require'nvim-treesitter.configs'.setup { - -- A list of parser names, or "all" (the five listed parsers should always be installed) - ensure_installed = { "c", "lua", "vim", "vimdoc", "query", "javascript", "typescript", "python", "cpp"}, - - -- Install parsers synchronously (only applied to `ensure_installed`) - sync_install = false, - - -- Automatically install missing parsers when entering buffer - -- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally - auto_install = true, - - highlight = { - enable = true, - - -- Setting this to true will run `:h syntax` and tree-sitter at the same time. - -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation). - -- Using this option may slow down your editor, and you may see some duplicate highlights. - -- Instead of true it can also be a list of languages - additional_vim_regex_highlighting = false, - }, -} -- cgit v1.2.3