Compare commits

..

No commits in common. "1f4c21f4637eb7af77c34ac87c739e378043a336" and "a6dcf6874b54b294d0c2c4009161bdebd55183ef" have entirely different histories.

View File

@ -598,6 +598,12 @@ require('lazy').setup({
end, end,
}) })
-- LSP servers and clients are able to communicate to each other what features they support.
-- By default, Neovim doesn't support everything that is in the LSP specification.
-- When you add blink.cmp, luasnip, etc. Neovim now has *more* capabilities.
-- So, we create new capabilities with blink.cmp, and then broadcast that to the servers.
local capabilities = require('blink.cmp').get_lsp_capabilities()
-- Enable the following language servers -- Enable the following language servers
-- Feel free to add/remove any LSPs that you want here. They will automatically be installed. -- Feel free to add/remove any LSPs that you want here. They will automatically be installed.
-- See `:help lsp-config` for information about keys and how to configure -- See `:help lsp-config` for information about keys and how to configure
@ -661,6 +667,7 @@ require('lazy').setup({
require('mason-tool-installer').setup { ensure_installed = ensure_installed } require('mason-tool-installer').setup { ensure_installed = ensure_installed }
for name, server in pairs(servers) do for name, server in pairs(servers) do
server.capabilities = vim.tbl_deep_extend('force', {}, capabilities, server.capabilities or {})
vim.lsp.config(name, server) vim.lsp.config(name, server)
vim.lsp.enable(name) vim.lsp.enable(name)
end end
@ -875,7 +882,6 @@ require('lazy').setup({
lazy = false, lazy = false,
build = ':TSUpdate', build = ':TSUpdate',
branch = 'main', branch = 'main',
-- [[ Configure Treesitter ]] See `:help nvim-treesitter-intro`
config = function() config = function()
local parsers = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc' } local parsers = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc' }
require('nvim-treesitter').install(parsers) require('nvim-treesitter').install(parsers)
@ -884,20 +890,9 @@ require('lazy').setup({
local buf, filetype = args.buf, args.match local buf, filetype = args.buf, args.match
local language = vim.treesitter.language.get_lang(filetype) local language = vim.treesitter.language.get_lang(filetype)
if not language then return end if not vim.tbl_contains(parsers, language) then return end
-- check if parser exists and load it vim.treesitter.start()
if not vim.treesitter.language.add(language) then return end
-- enables syntax highlighting and other treesitter features
vim.treesitter.start(buf, language)
-- enables treesitter based folds
-- for more info on folds see `:help folds`
-- vim.wo.foldexpr = 'v:lua.vim.treesitter.foldexpr()'
-- vim.wo.foldmethod = 'expr'
-- enables treesitter based indentation
vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()"
end, end,
}) })
end, end,