added navic
This commit is contained in:
@ -88,6 +88,11 @@ local on_attach = function(client, bufnr)
|
|||||||
if client.server_capabilities.documentHighlightProvider then
|
if client.server_capabilities.documentHighlightProvider then
|
||||||
document_highlight(bufnr)
|
document_highlight(bufnr)
|
||||||
end
|
end
|
||||||
|
if client.server_capabilities.documentSymbolProvider then
|
||||||
|
print('attach navic')
|
||||||
|
local navic = require("nvim-navic")
|
||||||
|
navic.attach(client, bufnr)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return {
|
return {
|
||||||
@ -97,11 +102,13 @@ return {
|
|||||||
'p00f/clangd_extensions.nvim',
|
'p00f/clangd_extensions.nvim',
|
||||||
'Fildo7525/pretty_hover',
|
'Fildo7525/pretty_hover',
|
||||||
'creativenull/efmls-configs-nvim',
|
'creativenull/efmls-configs-nvim',
|
||||||
|
'SmiteshP/nvim-navic',
|
||||||
},
|
},
|
||||||
version = nil,
|
version = nil,
|
||||||
branch = 'master',
|
branch = 'master',
|
||||||
config = function()
|
config = function()
|
||||||
local lspconfig = require('lspconfig')
|
local lspconfig = require('lspconfig')
|
||||||
|
require("nvim-navic").setup({})
|
||||||
|
|
||||||
local capabilities = require('cmp_nvim_lsp').default_capabilities(vim.lsp.protocol.make_client_capabilities())
|
local capabilities = require('cmp_nvim_lsp').default_capabilities(vim.lsp.protocol.make_client_capabilities())
|
||||||
capabilities.workspace = {
|
capabilities.workspace = {
|
||||||
|
@ -6,6 +6,8 @@ return {
|
|||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
vim.opt.laststatus = 3
|
vim.opt.laststatus = 3
|
||||||
|
local navic = require('nvim-navic')
|
||||||
|
local colors = require('bamboo.palette')
|
||||||
require('lualine').setup({
|
require('lualine').setup({
|
||||||
options = {
|
options = {
|
||||||
theme = 'auto',
|
theme = 'auto',
|
||||||
@ -28,8 +30,24 @@ return {
|
|||||||
},
|
},
|
||||||
lualine_c = {
|
lualine_c = {
|
||||||
'hostname',
|
'hostname',
|
||||||
'getcwd',
|
{
|
||||||
{ 'filename', path = 1, file_status = true },
|
'getcwd',
|
||||||
|
color = { fg = colors.vulgaris.orange, gui = 'bold' },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'filename',
|
||||||
|
path = 1,
|
||||||
|
file_status = true,
|
||||||
|
color = { fg = colors.vulgaris.light_blue, gui = 'bold' },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
function()
|
||||||
|
return require('nvim-navic').get_location()
|
||||||
|
end,
|
||||||
|
cond = function()
|
||||||
|
return package.loaded['nvim-navic'] and require('nvim-navic').is_available()
|
||||||
|
end,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
lualine_y = {
|
lualine_y = {
|
||||||
'searchcount',
|
'searchcount',
|
||||||
@ -53,7 +71,7 @@ return {
|
|||||||
path = 0,
|
path = 0,
|
||||||
file_status = true,
|
file_status = true,
|
||||||
separator = { left = '', right = '' },
|
separator = { left = '', right = '' },
|
||||||
color = { fg = '#000000', bg = '#ff9966', gui='bold' },
|
color = { fg = '#000000', bg = '#ff9966', gui = 'bold' },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
lualine_b = {
|
lualine_b = {
|
||||||
|
Reference in New Issue
Block a user