feat(kauffinger/lazyvim): new config with my own from kauffinger/lazyvim

This commit is contained in:
2024-02-25 17:37:23 +03:00
commit 33c2bc8397
35 changed files with 1542 additions and 0 deletions

View File

@@ -0,0 +1,50 @@
-- add more treesitter parsers
return {
"nvim-treesitter/nvim-treesitter",
build = function()
require("nvim-treesitter.install").update({ with_sync = true })
end,
dependencies = {
{
"JoosepAlviste/nvim-ts-context-commentstring",
opts = {
custom_calculation = function(_, language_tree)
if vim.bo.filetype == "blade" and language_tree._lang ~= "javascript" and language_tree._lang ~= "php" then
return "{{-- %s --}}"
end
end,
},
},
"nvim-treesitter/nvim-treesitter-textobjects",
},
opts = {
ensure_installed = "all",
-- auto_install = true,
highlight = {
enable = true,
},
-- Needed because treesitter highlight turns off autoindent for php files
indent = {
enable = true,
},
},
config = function(_, opts)
---@class ParserInfo[]
local parser_config = require("nvim-treesitter.parsers").get_parser_configs()
parser_config.blade = {
install_info = {
url = "https://github.com/EmranMR/tree-sitter-blade",
files = {
"src/parser.c",
-- "src/scanner.cc",
},
branch = "main",
-- generate_requires_npm = true,
-- requires_generate_from_grammar = true,
},
filetype = "blade",
}
require("nvim-treesitter.configs").setup(opts)
end,
}