diff --git a/.config/nvim/lua/pluginconf/line.lua b/.config/nvim/lua/pluginconf/line.lua index c8ebaaf..fc7bf5d 100644 --- a/.config/nvim/lua/pluginconf/line.lua +++ b/.config/nvim/lua/pluginconf/line.lua @@ -1,25 +1,4 @@ local lline = require "lualine" -local navic = require "nvim-navic" - -local function navic_component() - if navic.is_available() then - local data = navic.get_data() - local s = "" - - for i, v in ipairs(data) do - if v.type ~= "Package" then - if i ~= 1 then - s = s .. "  " - end - - s = s .. v.icon .. v.name - end - end - - return s - end - return "" -end lline.setup { options = { @@ -28,6 +7,5 @@ lline.setup { sections = { lualine_b = { "branch", "diff", "lsp_progress" }, lualine_c = { "filename", "diagnostics" }, - lualine_x = { "fileformat", "filetype", navic_component }, }, } diff --git a/.config/nvim/lua/pluginconf/lspconf.lua b/.config/nvim/lua/pluginconf/lspconf.lua index 5fd0583..5e5e7d0 100644 --- a/.config/nvim/lua/pluginconf/lspconf.lua +++ b/.config/nvim/lua/pluginconf/lspconf.lua @@ -1,29 +1,22 @@ +local map = vim.api.nvim_set_keymap local lspc = require "lspconfig" -local navic = require "nvim-navic" local caps = require("cmp_nvim_lsp").update_capabilities(vim.lsp.protocol.make_client_capabilities()) -local function on_attach(client, bufnr) - if client.server_capabilities.documentSymbolProvider then - navic.attach(client, bufnr) - end -end - local lua_runtime_path = vim.split(package.path, ";") table.insert(lua_runtime_path, "lua/?.lua") table.insert(lua_runtime_path, "lua/?/init.lua") -lspc.clangd.setup { capabilities = caps, on_attach = on_attach } -lspc.cssls.setup { capabilities = caps, on_attach = on_attach } -lspc.eslint.setup { capabilities = caps, on_attach = on_attach } -lspc.haxe_language_server.setup { capabilities = caps, on_attach = on_attach } -lspc.html.setup { capabilities = caps, on_attach = on_attach } -lspc.jsonls.setup { capabilities = caps, on_attach = on_attach } -lspc.ocamllsp.setup { capabilities = caps, on_attach = on_attach } -lspc.prosemd_lsp.setup { capabilities = caps, on_attach = on_attach } +lspc.clangd.setup { capabilities = caps } +lspc.cssls.setup { capabilities = caps } +lspc.eslint.setup { capabilities = caps } +lspc.haxe_language_server.setup { capabilities = caps } +lspc.html.setup { capabilities = caps } +lspc.jsonls.setup { capabilities = caps } +lspc.ocamllsp.setup { capabilities = caps } +lspc.prosemd_lsp.setup { capabilities = caps } lspc.rust_analyzer.setup { capabilities = caps, - on_attach = on_attach, settings = { ["rust-analyzer"] = { checkOnSave = { @@ -34,7 +27,6 @@ lspc.rust_analyzer.setup { } lspc.sumneko_lua.setup { capabilities = caps, - on_attach = on_attach, settings = { Lua = { runtime = { @@ -53,14 +45,13 @@ lspc.sumneko_lua.setup { }, }, } -lspc.taplo.setup { capabilities = caps, on_attach = on_attach } -lspc.yamlls.setup { capabilities = caps, on_attach = on_attach } -lspc.zls.setup { capabilities = caps, on_attach = on_attach } +lspc.taplo.setup { capabilities = caps } +lspc.yamlls.setup { capabilities = caps } +lspc.zls.setup { capabilities = caps } -- Mappings. local opts = { noremap = true, silent = true } -local map = vim.api.nvim_set_keymap -- See `:help vim.lsp.*` for documentation on any of the below functions map("n", "gd", "lua vim.lsp.buf.definition()", opts) map("n", "K", "lua vim.lsp.buf.hover()", opts) diff --git a/.config/nvim/lua/plugins.lua b/.config/nvim/lua/plugins.lua index 600ea2a..732dee6 100644 --- a/.config/nvim/lua/plugins.lua +++ b/.config/nvim/lua/plugins.lua @@ -149,11 +149,6 @@ return require("packer").startup(function(use) use "DingDean/wgsl.vim" - use { - "SmiteshP/nvim-navic", - requires = "neovim/nvim-lspconfig", - } - use { "rcarriga/nvim-notify", config = function() @@ -174,6 +169,5 @@ return require("packer").startup(function(use) require("treesitter-context").setup {} end } - cmp_plugins(use) end)