mirror of
https://github.com/nvim-lua/kickstart.nvim.git
synced 2026-05-14 08:23:48 +00:00
parent
c0cc054155
commit
f27810d1bd
2
init.lua
2
init.lua
@ -893,7 +893,7 @@ require('lazy').setup({
|
|||||||
|
|
||||||
-- check if treesitter indentation is available for this language, and if so enable it
|
-- check if treesitter indentation is available for this language, and if so enable it
|
||||||
-- in case there is no indent query, the indentexpr will fallback to the vim's built in one
|
-- in case there is no indent query, the indentexpr will fallback to the vim's built in one
|
||||||
local has_indent_query = vim.treesitter.query.get(language, 'indent') ~= nil
|
local has_indent_query = vim.treesitter.query.get(language, 'indents') ~= nil
|
||||||
|
|
||||||
-- enables treesitter based indentation
|
-- enables treesitter based indentation
|
||||||
if has_indent_query then vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()" end
|
if has_indent_query then vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()" end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user