From 992d0fef71c2ded071b94de1d7fccbb63ec438ae Mon Sep 17 00:00:00 2001 From: Daryl Ronningen Date: Thu, 7 Jul 2022 16:14:10 -0700 Subject: [PATCH] neovim updates --- .config/nvim/init.lua | 2 +- .config/nvim/lua/user/lsp/init.lua | 3 +-- .config/nvim/lua/user/lsp/mason.lua | 18 ++++++++++++++++++ .../nvim/lua/user/lsp/settings/sumneko_lua.lua | 9 +++++++++ .config/nvim/lua/user/nvimtree.lua | 2 +- .config/nvim/lua/user/plugins.lua | 3 +-- .config/nvim/lua/user/spectre.lua | 4 ++-- .config/nvim/plugin/packer_compiled.lua | 11 +++-------- 8 files changed, 36 insertions(+), 16 deletions(-) create mode 100644 .config/nvim/lua/user/lsp/mason.lua create mode 100644 .config/nvim/lua/user/lsp/settings/sumneko_lua.lua diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index 585b0d2..9e58fbd 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -1,6 +1,7 @@ require("user.options") require("user.keymaps") require("user.plugins") +require("user.notify") require("user.cmp") require("user.lsp") require("user.colorscheme") @@ -23,4 +24,3 @@ require("user.colorizer") require("user.discord") require("user.spectre") require("user.dap") -require("user.notify") diff --git a/.config/nvim/lua/user/lsp/init.lua b/.config/nvim/lua/user/lsp/init.lua index 32bb1c7..aedcb0f 100644 --- a/.config/nvim/lua/user/lsp/init.lua +++ b/.config/nvim/lua/user/lsp/init.lua @@ -20,7 +20,6 @@ lspconfig.jsonls.setup({ }) require("user.lsp.handlers").setup() -require("user.lsp.installer") +require("user.lsp.mason") require("user.lsp.nullls") -require("user.lsp.nlsp") require("user.lsp.signature") diff --git a/.config/nvim/lua/user/lsp/mason.lua b/.config/nvim/lua/user/lsp/mason.lua new file mode 100644 index 0000000..e1d51ef --- /dev/null +++ b/.config/nvim/lua/user/lsp/mason.lua @@ -0,0 +1,18 @@ +local status_ok, mason = pcall(require, "mason") +if not status_ok then + return +end + +local lspconfig = require("lspconfig") + +mason.setup() +require("mason-lspconfig").setup({ + automatic_installation = true, +}) + +lspconfig.util.default_config = vim.tbl_extend("force", lspconfig.util.default_config, { + on_attach = require("user.lsp.handlers").on_attach, + capabilities = require("user.lsp.handlers").capabilities, +}) + +require("user.lsp.settings.sumneko_lua") diff --git a/.config/nvim/lua/user/lsp/settings/sumneko_lua.lua b/.config/nvim/lua/user/lsp/settings/sumneko_lua.lua new file mode 100644 index 0000000..e2547c9 --- /dev/null +++ b/.config/nvim/lua/user/lsp/settings/sumneko_lua.lua @@ -0,0 +1,9 @@ +local lspconfig = require("lspconfig") + +lspconfig.sumneko_lua.setup({ + Lua = { + diagnostics = { + globals = { 'vim' }, + }, + }, +}) diff --git a/.config/nvim/lua/user/nvimtree.lua b/.config/nvim/lua/user/nvimtree.lua index 0d2799b..a1f9fae 100644 --- a/.config/nvim/lua/user/nvimtree.lua +++ b/.config/nvim/lua/user/nvimtree.lua @@ -25,7 +25,7 @@ nvim_tree.setup({ ignore_ft_on_setup = { "alpha", }, - open_on_tab = false, + open_on_tab = true, hijack_cursor = true, update_cwd = true, diagnostics = { diff --git a/.config/nvim/lua/user/plugins.lua b/.config/nvim/lua/user/plugins.lua index 231bae9..7c20d56 100644 --- a/.config/nvim/lua/user/plugins.lua +++ b/.config/nvim/lua/user/plugins.lua @@ -63,8 +63,7 @@ return packer.startup(function(use) -- LSP use("neovim/nvim-lspconfig") - use("williamboman/nvim-lsp-installer") - use("tamago324/nlsp-settings.nvim") + use("williamboman/mason.nvim") use("jose-elias-alvarez/null-ls.nvim") use("b0o/SchemaStore.nvim") use("ray-x/lsp_signature.nvim") diff --git a/.config/nvim/lua/user/spectre.lua b/.config/nvim/lua/user/spectre.lua index 88a26cb..4e5f59d 100644 --- a/.config/nvim/lua/user/spectre.lua +++ b/.config/nvim/lua/user/spectre.lua @@ -4,6 +4,6 @@ if not status_ok then end spectre.setup({ - live_update = false, - is_insert_mode = false, + live_update = true, + is_insert_mode = true, }) diff --git a/.config/nvim/plugin/packer_compiled.lua b/.config/nvim/plugin/packer_compiled.lua index e7764ab..c06b72b 100644 --- a/.config/nvim/plugin/packer_compiled.lua +++ b/.config/nvim/plugin/packer_compiled.lua @@ -164,10 +164,10 @@ _G.packer_plugins = { path = "/home/relms/.local/share/nvim/site/pack/packer/start/lualine.nvim", url = "https://github.com/nvim-lualine/lualine.nvim" }, - ["nlsp-settings.nvim"] = { + ["mason.nvim"] = { loaded = true, - path = "/home/relms/.local/share/nvim/site/pack/packer/start/nlsp-settings.nvim", - url = "https://github.com/tamago324/nlsp-settings.nvim" + path = "/home/relms/.local/share/nvim/site/pack/packer/start/mason.nvim", + url = "https://github.com/williamboman/mason.nvim" }, ["nord.nvim"] = { loaded = true, @@ -209,11 +209,6 @@ _G.packer_plugins = { path = "/home/relms/.local/share/nvim/site/pack/packer/start/nvim-dap-virtual-text", url = "https://github.com/theHamsta/nvim-dap-virtual-text" }, - ["nvim-lsp-installer"] = { - loaded = true, - path = "/home/relms/.local/share/nvim/site/pack/packer/start/nvim-lsp-installer", - url = "https://github.com/williamboman/nvim-lsp-installer" - }, ["nvim-lspconfig"] = { loaded = true, path = "/home/relms/.local/share/nvim/site/pack/packer/start/nvim-lspconfig",