forest
This commit is contained in:
@@ -61,7 +61,13 @@ local lsp_confs = {
|
||||
},
|
||||
},
|
||||
},
|
||||
ccls = {},
|
||||
ccls = {
|
||||
init_options = {
|
||||
clang = {
|
||||
fallbackStyle = "{BasedOnStyle: LLVM, IndentWidth: 4, TabWidth: 4, UseTab: Never}",
|
||||
},
|
||||
},
|
||||
},
|
||||
jedi_language_server = {
|
||||
filetypes = { "python", "sage.python" },
|
||||
},
|
||||
@@ -138,7 +144,7 @@ for server, conf in pairs(lsp_confs) do
|
||||
if special_setup then
|
||||
special_setup(final_config)
|
||||
else
|
||||
-- lspconfig[server].setup(final_config)
|
||||
-- lspconfig[server].setup(final_config)
|
||||
vim.lsp.config[server] = final_config
|
||||
vim.lsp.enable(server)
|
||||
-- lspconfig(server, final_config)
|
||||
@@ -240,11 +246,11 @@ map('n', '<Leader>pc', 'za', { noremap = true })
|
||||
|
||||
-- folds and treesitter
|
||||
vim.api.nvim_create_autocmd('FileType', {
|
||||
pattern = { '*' },
|
||||
pattern = { '*' },
|
||||
callback = function()
|
||||
if vim.bo.filetype ~= "plaintex" and vim.bo.filetype ~= "tex" and vim.bo.filetype ~= "latex" and
|
||||
vim.bo.filetype ~= "qf" and vim.bo.filetype ~= "bib" and vim.bo.filetype ~= "" and vim.bo.filetype ~= "pdf"
|
||||
and vim.bo.filetype ~= "conf" and vim.bo.filetype ~= "TelescopePrompt" and vim.bo.filetype ~= "lazy" and vim.bo.filetype ~= "lazy_backdrop" and vim.bo.filetype ~= "TelescopeResults" then
|
||||
and vim.bo.filetype ~= "conf" and vim.bo.filetype ~= "TelescopePrompt" and vim.bo.filetype ~= "lazy" and vim.bo.filetype ~= "lazy_backdrop" and vim.bo.filetype ~= "TelescopeResults" and vim.bo.filetype ~= "netrw" and vim.bo.filetype ~= "html.mustache" then
|
||||
vim.treesitter.start()
|
||||
vim.wo[0][0].foldexpr = 'v:lua.vim.treesitter.foldexpr()'
|
||||
vim.wo[0][0].foldmethod = 'expr'
|
||||
@@ -252,6 +258,14 @@ vim.api.nvim_create_autocmd('FileType', {
|
||||
vim.wo[0][0].foldlevel = 99
|
||||
vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()"
|
||||
end
|
||||
|
||||
if vim.bo.filetype == "c" or vim.bo.filetype == "cpp" or vim.bo.filetype == "cuda" or vim.bo.filetype == "objc" or vim.bo.filetype == "objcpp" then
|
||||
vim.opt_local.shiftwidth = 2
|
||||
vim.opt_local.tabstop = 2
|
||||
vim.opt_local.softtabstop = 2
|
||||
vim.opt_local.expandtab = true
|
||||
vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()"
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user