mirror of
https://github.com/Baipyrus/nvim-config.git
synced 2024-12-25 12:51:45 +00:00
add nvim-navic for code context instead of nvim-treesitter-context
This commit is contained in:
parent
44b45b7c11
commit
735b2ed90b
@ -28,6 +28,9 @@ return {
|
||||
|
||||
-- Allows extra capabilities provided by nvim-cmp
|
||||
'hrsh7th/cmp-nvim-lsp',
|
||||
|
||||
-- Code context using LSP info
|
||||
'SmiteshP/nvim-navic',
|
||||
},
|
||||
config = function()
|
||||
-- Brief aside: **What is LSP?**
|
||||
@ -206,6 +209,20 @@ return {
|
||||
},
|
||||
}
|
||||
|
||||
-- Setup code context via nvim-navic
|
||||
require('nvim-navic').setup {
|
||||
lsp = {
|
||||
auto_attach = true,
|
||||
preference = {
|
||||
'svelte',
|
||||
'intelephense',
|
||||
'ts_ls',
|
||||
'tailwindcss',
|
||||
},
|
||||
},
|
||||
highlight = true,
|
||||
}
|
||||
|
||||
-- Ensure the servers and tools above are installed
|
||||
-- To check the current status of installed tools and/or manually install
|
||||
-- other tools, you can run
|
||||
|
@ -2,7 +2,6 @@ return {
|
||||
{ -- Highlight, edit, and navigate code
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
dependencies = {
|
||||
'nvim-treesitter/nvim-treesitter-context',
|
||||
'nvim-treesitter/nvim-treesitter-textobjects',
|
||||
},
|
||||
build = ':TSUpdate',
|
||||
|
@ -96,6 +96,9 @@ vim.opt.guicursor = 'n-v-i-c:block-Cursor'
|
||||
vim.o.laststatus = 3
|
||||
vim.api.nvim_set_hl(0, 'WinSeparator', { bg = nil })
|
||||
|
||||
-- Set winbar to nvim-navic for code context
|
||||
vim.o.winbar = "%{%v:lua.require'nvim-navic'.get_location()%}"
|
||||
|
||||
vim.api.nvim_create_autocmd('UIEnter', {
|
||||
group = vim.api.nvim_create_augroup('SetGUISettings', { clear = true }),
|
||||
callback = function()
|
||||
|
Loading…
Reference in New Issue
Block a user