Merge branch 'main' of codeberg.org:aleidk/dots

This commit is contained in:
Alexander Navarro 2023-11-13 22:13:19 -03:00
commit ea8bd3a653
8 changed files with 46 additions and 2 deletions

View file

@ -0,0 +1,9 @@
(directive) @function
(directive_start) @function
(directive_end) @function
(comment) @comment
((parameter) @include (#set! "priority" 110))
((php_only) @include (#set! "priority" 110))
((bracket_start) @function (#set! "priority" 120))
((bracket_end) @function (#set! "priority" 120))
(keyword) @function

View file

@ -0,0 +1,3 @@
((php) @injection.content
(#set! injection.combined)
(#set! injection.language php))

View file

@ -30,6 +30,7 @@
"mini.pairs": { "branch": "main", "commit": "6f6bd7ed5757b40bc29c73dac0d743e4e6978124" }, "mini.pairs": { "branch": "main", "commit": "6f6bd7ed5757b40bc29c73dac0d743e4e6978124" },
"mini.surround": { "branch": "main", "commit": "9d1956b576d7051da3a483b251dfc778121c60db" }, "mini.surround": { "branch": "main", "commit": "9d1956b576d7051da3a483b251dfc778121c60db" },
"neodev.nvim": { "branch": "main", "commit": "d617d9eb27e73e701e446874c6ea2cb528719260" }, "neodev.nvim": { "branch": "main", "commit": "d617d9eb27e73e701e446874c6ea2cb528719260" },
"neogen": { "branch": "main", "commit": "cb1f384df804c1bf729332c4f728253fe17962d4" },
"neogit": { "branch": "master", "commit": "01dc0a7e237a4d6d053cea2503f5dd1a81c1e310" }, "neogit": { "branch": "master", "commit": "01dc0a7e237a4d6d053cea2503f5dd1a81c1e310" },
"noice.nvim": { "branch": "main", "commit": "92433164e2f7118d4122c7674c3834d9511722ba" }, "noice.nvim": { "branch": "main", "commit": "92433164e2f7118d4122c7674c3834d9511722ba" },
"nui.nvim": { "branch": "main", "commit": "c0c8e347ceac53030f5c1ece1c5a5b6a17a25b32" }, "nui.nvim": { "branch": "main", "commit": "c0c8e347ceac53030f5c1ece1c5a5b6a17a25b32" },

View file

@ -70,5 +70,6 @@ vim.filetype.add({
pattern = { pattern = {
-- INFO: Match filenames like - ".env.example", ".env.local" and so on -- INFO: Match filenames like - ".env.example", ".env.local" and so on
["%.env%.[%w_.-]+"] = "dotenv", ["%.env%.[%w_.-]+"] = "dotenv",
[".*%.blade%.php"] = "blade",
}, },
}) })

View file

@ -31,4 +31,19 @@ return {
MAP({ "n", "v" }, "gll", cb.cline, "Create a comment line") MAP({ "n", "v" }, "gll", cb.cline, "Create a comment line")
end, end,
}, },
{
"danymat/neogen",
config = { snippet_engine = "luasnip" },
dependencies = { "nvim-treesitter/nvim-treesitter" },
version = "*", -- stable releases
keys = {
{
"gcd",
function()
require("neogen").generate()
end,
desc = "Generate comment docstring",
},
},
},
} }

View file

@ -9,6 +9,7 @@ return {
lua = { "stylua" }, lua = { "stylua" },
python = { "blue" }, python = { "blue" },
-- Use a sub-list to run only the first available formatter -- Use a sub-list to run only the first available formatter
json = { { "prettierd", "prettier" } },
javascript = { { "prettierd", "prettier" } }, javascript = { { "prettierd", "prettier" } },
typescript = { { "prettierd", "prettier" } }, typescript = { { "prettierd", "prettier" } },
javascriptreact = { { "prettierd", "prettier" } }, javascriptreact = { { "prettierd", "prettier" } },
@ -24,7 +25,7 @@ return {
if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then
return return
end end
return { timeout_ms = 500, lsp_fallback = true } return { timeout_ms = 2000, lsp_fallback = true }
end, end,
}, },
config = function(_, opts) config = function(_, opts)

View file

@ -22,6 +22,7 @@ return {
nmap("<leader>lr", vim.lsp.buf.rename, "Rename") nmap("<leader>lr", vim.lsp.buf.rename, "Rename")
nmap("<leader>la", vim.lsp.buf.code_action, "Code Action") nmap("<leader>la", vim.lsp.buf.code_action, "Code Action")
nmap("<leader>ld", vim.lsp.buf.type_definition, "Go to type definition")
nmap("<leader>lf", function() nmap("<leader>lf", function()
vim.lsp.buf.format() vim.lsp.buf.format()
end, "Format") end, "Format")
@ -49,6 +50,7 @@ return {
-- Enable the following language servers -- Enable the following language servers
-- To see options and cofigurations: https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md -- To see options and cofigurations: https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md
local servers = { local servers = {
astro = {},
bashls = {}, bashls = {},
cssls = {}, cssls = {},
dockerls = {}, dockerls = {},

View file

@ -93,6 +93,18 @@ return {
vim.opt.foldexpr = "nvim_treesitter#foldexpr()" vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
-- Uncoment this line to disable auto folding on file open -- Uncoment this line to disable auto folding on file open
-- vim.cmd("set nofoldenable") vim.cmd("set nofoldenable")
-- TODO: remove this when blade treesitter is added to nvim-treesitter repo
-- Also remove the "config/nvim/after/queries/blade" folder.
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",
}
end, end,
} }