diff --git a/init.lua b/init.lua index 8090cdf..bc8e43d 100644 --- a/init.lua +++ b/init.lua @@ -54,17 +54,6 @@ vim.keymap.set('n', 'fG', function() builtin.grep_string({ search = vim.fn.input("grep > ") } ); end ) --- Harpoon -local mark = require("harpoon.mark") -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", "", function() ui.nav_file(1) end) -vim.keymap.set("n", "", function() ui.nav_file(2) end) -vim.keymap.set("n", "", function() ui.nav_file(3) end) -vim.keymap.set("n", "", function() ui.nav_file(4) end) - -- UndoTree vim.keymap.set("n", "u", vim.cmd.UndotreeToggle) vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir" @@ -73,24 +62,6 @@ vim.opt.undofile = true -- Reserve a space in the gutter vim.opt.signcolumn = 'yes' - --- lsp-zero -local cmp = require('cmp') - -cmp.setup({ - sources = { - {name = 'nvim_lsp'}, - }, - snippet = { - expand = function(args) - -- You need Neovim v0.10 to use vim.snippet - vim.snippet.expand(args.body) - end, - }, - mapping = cmp.mapping.preset.insert({}), -}) --- lsp-zero end - -- move paragraphs vim.keymap.set("v", "J", ":m '>+1gv=gv") vim.keymap.set("v", "K", ":m '<-2gv=gv") diff --git a/lua/plugins/csp.lua b/lua/plugins/csp.lua deleted file mode 100644 index b2ca118..0000000 --- a/lua/plugins/csp.lua +++ /dev/null @@ -1,20 +0,0 @@ -return { - { - "hrsh7th/nvim-cmp", - -- load cmp on InsertEnter - event = "InsertEnter", - -- these dependencies will only be loaded when cmp loads - -- dependencies are always lazy-loaded unless specified otherwise - dependencies = { - "hrsh7th/cmp-nvim-lsp", - "hrsh7th/cmp-buffer", - }, - config = function() - -- ... - end, - }, - { - "neovim/nvim-lspconfig", - }, -} - diff --git a/lua/plugins/harpoon.lua b/lua/plugins/harpoon.lua deleted file mode 100644 index d7b47f9..0000000 --- a/lua/plugins/harpoon.lua +++ /dev/null @@ -1,6 +0,0 @@ -return { - { - "theprimeagen/harpoon", - } -} - diff --git a/lua/plugins/lsp-zero.lua b/lua/plugins/lsp-zero.lua deleted file mode 100644 index 806f13f..0000000 --- a/lua/plugins/lsp-zero.lua +++ /dev/null @@ -1,91 +0,0 @@ -return { - { - 'williamboman/mason.nvim', - lazy = false, - opts = {}, - }, - - -- Autocompletion - { - 'hrsh7th/nvim-cmp', - event = 'InsertEnter', - config = function() - local cmp = require('cmp') - - cmp.setup({ - sources = { - {name = 'nvim_lsp'}, - }, - mapping = cmp.mapping.preset.insert({ - [''] = cmp.mapping.complete(), - [''] = cmp.mapping.scroll_docs(-4), - [''] = cmp.mapping.scroll_docs(4), - }), - snippet = { - expand = function(args) - vim.snippet.expand(args.body) - end, - }, - }) - end - }, - - -- LSP - { - 'neovim/nvim-lspconfig', - cmd = {'LspInfo', 'LspInstall', 'LspStart'}, - event = {'BufReadPre', 'BufNewFile'}, - dependencies = { - {'hrsh7th/cmp-nvim-lsp'}, - {'williamboman/mason.nvim'}, - {'williamboman/mason-lspconfig.nvim'}, - }, - init = function() - -- Reserve a space in the gutter - -- This will avoid an annoying layout shift in the screen - vim.opt.signcolumn = 'yes' - end, - config = function() - local lsp_defaults = require('lspconfig').util.default_config - - -- Add cmp_nvim_lsp capabilities settings to lspconfig - -- This should be executed before you configure any language server - lsp_defaults.capabilities = vim.tbl_deep_extend( - 'force', - lsp_defaults.capabilities, - require('cmp_nvim_lsp').default_capabilities() - ) - - -- LspAttach is where you enable features that only work - -- if there is a language server active in the file - vim.api.nvim_create_autocmd('LspAttach', { - desc = 'LSP actions', - callback = function(event) - local opts = {buffer = event.buf} - - vim.keymap.set('n', 'K', 'lua vim.lsp.buf.hover()', opts) - vim.keymap.set('n', 'gd', 'lua vim.lsp.buf.definition()', opts) - vim.keymap.set('n', 'gD', 'lua vim.lsp.buf.declaration()', opts) - vim.keymap.set('n', 'gi', 'lua vim.lsp.buf.implementation()', opts) - vim.keymap.set('n', 'go', 'lua vim.lsp.buf.type_definition()', opts) - vim.keymap.set('n', 'gr', 'lua vim.lsp.buf.references()', opts) - vim.keymap.set('n', 'gs', 'lua vim.lsp.buf.signature_help()', opts) - vim.keymap.set('n', '', 'lua vim.lsp.buf.rename()', opts) - vim.keymap.set({'n', 'x'}, '', 'lua vim.lsp.buf.format({async = true})', opts) - vim.keymap.set('n', '', 'lua vim.lsp.buf.code_action()', opts) - end, - }) - - require('mason-lspconfig').setup({ - ensure_installed = {}, - handlers = { - -- this first function is the "default handler" - -- it applies to every language server without a "custom handler" - function(server_name) - require('lspconfig')[server_name].setup({}) - end, - } - }) - end - } -}