diff --git a/lua/lsp/cmp.lua b/lua/lsp/cmp.lua index 97f3475..70ed5b1 100644 --- a/lua/lsp/cmp.lua +++ b/lua/lsp/cmp.lua @@ -2,8 +2,6 @@ local cmp = require "cmp" local luasnip = require "luasnip" local cmp_autopairs = require "nvim-autopairs.completion.cmp" -require("luasnip.loaders.from_vscode").lazy_load() - cmp.setup { snippet = { expand = function(args) @@ -44,55 +42,12 @@ cmp.setup { } -- Set configuration for specific filetype. -cmp.setup.filetype("python", { - sources = { - { name = "nvim_lsp" }, - }, -}) - -cmp.setup.filetype("nix", { - sources = { - { name = "nvim_lsp" }, - }, -}) - -cmp.setup.filetype("gitcommit", { - sources = { - { name = "nvim_lsp" }, - { name = "git" }, - { name = "spell" }, - { name = "commit" }, - { name = "buffer" }, - { name = "luasnip" }, - { name = "latex_symbols" }, - }, -}) - -cmp.setup.filetype("markdown", { - sources = { - { name = "nvim_lsp" }, - { name = "spell" }, - { name = "buffer" }, - { name = "luasnip" }, - { name = "latex_symbols" }, - }, -}) - -cmp.setup.cmdline("/", { - mapping = cmp.mapping.preset.cmdline(), - sources = { - { name = "nvim_lsp" }, - { name = "buffer" }, - }, -}) - +cmp.setup.filetype("python", { sources = { { name = "nvim_lsp" } } }) +cmp.setup.filetype("nix", { sources = { { name = "nvim_lsp" } } }) +cmp.setup.cmdline("/", { mapping = cmp.mapping.preset.cmdline(), sources = { { name = "buffer" } } }) cmp.setup.cmdline(":", { mapping = cmp.mapping.preset.cmdline(), - sources = { - { name = "nvim_lsp" }, - { name = "path" }, - { name = "cmdline" }, - }, + sources = { { name = "cmdline" }, { name = "path" } }, }) cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done()) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 656c112..10ef233 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -1,22 +1,15 @@ return { "neovim/nvim-lspconfig", - event = { "BufReadPre", "BufNewFile", "BufEnter" }, - cmd = { - "LspLog", - "LspStop", - "LspStart", - "LspRestart", - "LspInfo", - }, + event = { "BufReadPre", "BufNewFile" }, dependencies = { - { "hrsh7th/nvim-cmp" }, - { "rafamadriz/friendly-snippets" }, - { "windwp/nvim-autopairs" }, - { "jose-elias-alvarez/null-ls.nvim", lazy = true }, - { "mfussenegger/nvim-dap", lazy = true }, - { "folke/neodev.nvim", dependencies = { "hrsh7th/nvim-cmp" }, lazy = true }, - { "SmiteshP/nvim-navic" }, - { "SmiteshP/nvim-navbuddy" }, + { "hrsh7th/cmp-nvim-lsp", dependencies = { "hrsh7th/nvim-cmp" } }, + { "hrsh7th/cmp-buffer", dependencies = { "hrsh7th/nvim-cmp" } }, + { "hrsh7th/cmp-path", dependencies = { "hrsh7th/nvim-cmp" } }, + { "hrsh7th/cmp-cmdline", dependencies = { "hrsh7th/nvim-cmp" } }, + { "L3MON4D3/LuaSnip", dependencies = { "hrsh7th/nvim-cmp", "saadparwaiz1/cmp_luasnip" } }, + { "windwp/nvim-autopairs", dependencies = { "hrsh7th/nvim-cmp" } }, + { "folke/neodev.nvim", dependencies = { "hrsh7th/nvim-cmp" } }, + "jose-elias-alvarez/null-ls.nvim", }, config = function() require "lsp.config" diff --git a/lua/plugins/nvim-cmp.lua b/lua/plugins/nvim-cmp.lua deleted file mode 100644 index 7c7e20e..0000000 --- a/lua/plugins/nvim-cmp.lua +++ /dev/null @@ -1,15 +0,0 @@ -return { - "hrsh7th/nvim-cmp", - dependencies = { - { "hrsh7th/cmp-nvim-lsp" }, - { "hrsh7th/cmp-buffer" }, - { "hrsh7th/cmp-path" }, - { "hrsh7th/cmp-cmdline" }, - { "f3fora/cmp-spell" }, - { "petertriho/cmp-git" }, - { "Dosx001/cmp-commit" }, - { "kdheepak/cmp-latex-symbols" }, - { "L3MON4D3/LuaSnip" }, - { "saadparwaiz1/cmp_luasnip" }, - }, -} diff --git a/lua/plugins/nvim_navbuddy.lua b/lua/plugins/nvim_navbuddy.lua index 8efa757..caaef69 100644 --- a/lua/plugins/nvim_navbuddy.lua +++ b/lua/plugins/nvim_navbuddy.lua @@ -1,6 +1,6 @@ return { "SmiteshP/nvim-navbuddy", - dependencies = { "SmiteshP/nvim-navic", "MunifTanjim/nui.nvim" }, + dependencies = { "SmiteshP/nvim-navic", "MunifTanjim/nui.nvim", "neovim/nvim-lspconfig" }, cmd = { "Navbuddy" }, init = function() vim.keymap.set("n", "na", "Navbuddy") end, config = true, diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index f9b78b4..f950509 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -51,7 +51,6 @@ return { require("telescope").load_extension "fzf" require("telescope").load_extension "lazy" require("telescope").load_extension "noice" - require("telescope").load_extension "luasnip" require("telescope").load_extension "git_diffs" require("telescope").load_extension "command_center" require("telescope").load_extension "http"