From 439bb48189f03344896ebd8547b8a032c73931d8 Mon Sep 17 00:00:00 2001 From: srdusr Date: Wed, 10 May 2023 17:40:40 +0200 Subject: Automatically attach navic --- lua/plugins/navic.lua | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'lua/plugins') diff --git a/lua/plugins/navic.lua b/lua/plugins/navic.lua index a58240a..c27d76a 100644 --- a/lua/plugins/navic.lua +++ b/lua/plugins/navic.lua @@ -1,13 +1,13 @@ local navic = require("nvim-navic") -local on_attach = function(client, bufnr) - if client.server_capabilities.documentSymbolProvider then - navic.attach(client, bufnr) - end -end +--local on_attach = function(client, bufnr) +-- if client.server_capabilities.documentSymbolProvider then +-- navic.attach(client, bufnr) +-- end +--end -require("lspconfig").clangd.setup { - on_attach = on_attach -} +--require("lspconfig").clangd.setup { +-- on_attach = on_attach +--} navic.setup { icons = { @@ -38,6 +38,10 @@ navic.setup { Operator = " ", TypeParameter = " ", }, + lsp = { + auto_attach = true, + --preference = nil, + }, highlight = false, separator = " > ", depth_limit = 0, -- cgit v1.2.3