feat(config): added new plugins
This commit is contained in:
@@ -1,99 +1,10 @@
|
||||
-- return {
|
||||
-- {
|
||||
-- "nvim-treesitter/nvim-treesitter",
|
||||
-- opts = {
|
||||
-- endwise = {
|
||||
-- enable = true,
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
-- }
|
||||
return {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
build = ":TSUpdate",
|
||||
dependencies = {
|
||||
"nvim-treesitter/nvim-treesitter-textobjects",
|
||||
},
|
||||
event = "VeryLazy",
|
||||
main = "nvim-treesitter.configs",
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"c",
|
||||
"lua",
|
||||
"rust",
|
||||
"bash",
|
||||
"blade",
|
||||
"css",
|
||||
"go",
|
||||
"gomod",
|
||||
"html",
|
||||
"javascript",
|
||||
"json",
|
||||
"lua",
|
||||
"luadoc",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"nix",
|
||||
"org",
|
||||
"php",
|
||||
"phpdoc",
|
||||
"query",
|
||||
"rust",
|
||||
"sql",
|
||||
"svelte",
|
||||
"typescript",
|
||||
"regex",
|
||||
"vim",
|
||||
"yaml",
|
||||
},
|
||||
highlight = {
|
||||
enable = true,
|
||||
additional_vim_regex_highlighting = { "org" },
|
||||
},
|
||||
indent = {
|
||||
enable = true,
|
||||
},
|
||||
textobjects = {
|
||||
select = {
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = {
|
||||
endwise = {
|
||||
enable = true,
|
||||
lookahead = true,
|
||||
keymaps = {
|
||||
["af"] = "@function.outer",
|
||||
["if"] = "@function.inner",
|
||||
["ac"] = "@conditional.outer",
|
||||
["ic"] = "@conditional.inner",
|
||||
["al"] = "@loop.outer",
|
||||
["il"] = "@loop.inner",
|
||||
},
|
||||
},
|
||||
},
|
||||
incremental_selection = {
|
||||
enable = true,
|
||||
keymaps = {
|
||||
init_selection = "gnn",
|
||||
node_incremental = "grn",
|
||||
scope_incremental = "grc",
|
||||
node_decremental = "grm",
|
||||
},
|
||||
},
|
||||
},
|
||||
config = function(plug, config)
|
||||
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"},
|
||||
branch = "main",
|
||||
},
|
||||
filetype = "blade"
|
||||
}
|
||||
|
||||
vim.filetype.add({
|
||||
pattern = {
|
||||
['.*%.blade%.php'] = 'blade',
|
||||
}
|
||||
})
|
||||
|
||||
require(plug.main).setup(config);
|
||||
end,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user