fix for new mason, rollback folding to treesitter
This commit is contained in:
@@ -17,6 +17,7 @@ require("fidget").setup({
|
|||||||
require('mason').setup({})
|
require('mason').setup({})
|
||||||
require('mason-lspconfig').setup({
|
require('mason-lspconfig').setup({
|
||||||
ensure_installed = {'bashls', 'clangd', 'marksman', 'pylsp', 'ruff', 'texlab'},
|
ensure_installed = {'bashls', 'clangd', 'marksman', 'pylsp', 'ruff', 'texlab'},
|
||||||
|
automatic_enable = false,
|
||||||
})
|
})
|
||||||
require('mason-nvim-dap').setup({
|
require('mason-nvim-dap').setup({
|
||||||
ensure_installed = {'bash', 'cppdbg', 'python'},
|
ensure_installed = {'bash', 'cppdbg', 'python'},
|
||||||
|
|||||||
@@ -25,19 +25,19 @@ require'nvim-treesitter.configs'.setup {
|
|||||||
}
|
}
|
||||||
local vim = vim
|
local vim = vim
|
||||||
|
|
||||||
-- vim.o.foldmethod = 'expr'
|
vim.o.foldmethod = 'expr'
|
||||||
-- -- Default to treesitter folding
|
-- Default to treesitter folding
|
||||||
-- vim.o.foldexpr = 'v:lua.vim.treesitter.foldexpr()'
|
vim.o.foldexpr = 'v:lua.vim.treesitter.foldexpr()'
|
||||||
-- -- Prefer LSP folding if client supports it
|
-- Prefer LSP folding if client supports it
|
||||||
-- vim.api.nvim_create_autocmd('LspAttach', {
|
vim.api.nvim_create_autocmd('LspAttach', {
|
||||||
-- callback = function(args)
|
callback = function(args)
|
||||||
-- local client = vim.lsp.get_client_by_id(args.data.client_id)
|
local client = vim.lsp.get_client_by_id(args.data.client_id)
|
||||||
-- if client:supports_method('textDocument/foldingRange') then
|
if client:supports_method('textDocument/foldingRange') then
|
||||||
-- local win = vim.api.nvim_get_current_win()
|
local win = vim.api.nvim_get_current_win()
|
||||||
-- vim.wo[win][0].foldexpr = 'v:lua.vim.lsp.foldexpr()'
|
vim.wo[win][0].foldexpr = 'v:lua.vim.lsp.foldexpr()'
|
||||||
-- end
|
end
|
||||||
-- end,
|
end,
|
||||||
-- })
|
})
|
||||||
local opt = vim.opt
|
local opt = vim.opt
|
||||||
local api = vim.api
|
local api = vim.api
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|||||||
Reference in New Issue
Block a user