mirror of
https://github.com/Derisis13/dotfiles.git
synced 2026-09-16 10:00:51 +02:00
fix(nvim): treesitter
This commit is contained in:
@@ -6,6 +6,15 @@ local autocmd = vim.api.nvim_create_autocmd
|
|||||||
-- command = "tabdo wincmd =",
|
-- command = "tabdo wincmd =",
|
||||||
-- })
|
-- })
|
||||||
|
|
||||||
|
autocmd('FileType', {
|
||||||
|
pattern = { 'lua', 'vhdl', 'python', 'markdown', 'latex', 'c', 'cpp', 'hyprlang', 'html', 'css', 'yaml', 'json' },
|
||||||
|
callback = function()
|
||||||
|
vim.treesitter.start() -- highlighting
|
||||||
|
vim.wo.foldexpr = 'v:lua.vim.treesitter.foldexpr()' -- folds
|
||||||
|
vim.wo.foldmethod = 'expr'
|
||||||
|
-- vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()" -- indentation
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
-- disable folding on startup
|
-- disable folding on startup
|
||||||
vim.opt.foldenable = false
|
vim.opt.foldenable = false
|
||||||
@@ -47,3 +56,9 @@ local enable_providers = {
|
|||||||
end
|
end
|
||||||
|
|
||||||
vim.g.python3_host_prog = vim.fn.expand(os.getenv("XDG_STATE_HOME") .. "/virtualenvs/neovim/bin/python3")
|
vim.g.python3_host_prog = vim.fn.expand(os.getenv("XDG_STATE_HOME") .. "/virtualenvs/neovim/bin/python3")
|
||||||
|
|
||||||
|
-- Acu filetype
|
||||||
|
autocmd({'BufRead', 'BufNewFile'}, {
|
||||||
|
pattern = '*.acu',
|
||||||
|
command = "set filetype=acu"
|
||||||
|
})
|
||||||
|
|||||||
@@ -6,6 +6,3 @@ require "nvchad.options"
|
|||||||
-- o.cursorlineopt ='both' -- to enable cursorline!
|
-- o.cursorlineopt ='both' -- to enable cursorline!
|
||||||
|
|
||||||
local o = vim.o
|
local o = vim.o
|
||||||
-- Enable treesitter folding
|
|
||||||
o.foldmethod = "expr"
|
|
||||||
o.foldexpr = "nvim_treesitter#foldexpr()"
|
|
||||||
|
|||||||
Reference in New Issue
Block a user