Merge branch 'main' of codeberg.org:aleidk/dots
This commit is contained in:
commit
ea8bd3a653
8 changed files with 46 additions and 2 deletions
9
config/nvim/after/queries/blade/highlights.scm
Normal file
9
config/nvim/after/queries/blade/highlights.scm
Normal 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
|
||||
3
config/nvim/after/queries/blade/injections.scm
Normal file
3
config/nvim/after/queries/blade/injections.scm
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
((php) @injection.content
|
||||
(#set! injection.combined)
|
||||
(#set! injection.language php))
|
||||
|
|
@ -30,6 +30,7 @@
|
|||
"mini.pairs": { "branch": "main", "commit": "6f6bd7ed5757b40bc29c73dac0d743e4e6978124" },
|
||||
"mini.surround": { "branch": "main", "commit": "9d1956b576d7051da3a483b251dfc778121c60db" },
|
||||
"neodev.nvim": { "branch": "main", "commit": "d617d9eb27e73e701e446874c6ea2cb528719260" },
|
||||
"neogen": { "branch": "main", "commit": "cb1f384df804c1bf729332c4f728253fe17962d4" },
|
||||
"neogit": { "branch": "master", "commit": "01dc0a7e237a4d6d053cea2503f5dd1a81c1e310" },
|
||||
"noice.nvim": { "branch": "main", "commit": "92433164e2f7118d4122c7674c3834d9511722ba" },
|
||||
"nui.nvim": { "branch": "main", "commit": "c0c8e347ceac53030f5c1ece1c5a5b6a17a25b32" },
|
||||
|
|
|
|||
|
|
@ -70,5 +70,6 @@ vim.filetype.add({
|
|||
pattern = {
|
||||
-- INFO: Match filenames like - ".env.example", ".env.local" and so on
|
||||
["%.env%.[%w_.-]+"] = "dotenv",
|
||||
[".*%.blade%.php"] = "blade",
|
||||
},
|
||||
})
|
||||
|
|
|
|||
|
|
@ -31,4 +31,19 @@ return {
|
|||
MAP({ "n", "v" }, "gll", cb.cline, "Create a comment line")
|
||||
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",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ return {
|
|||
lua = { "stylua" },
|
||||
python = { "blue" },
|
||||
-- Use a sub-list to run only the first available formatter
|
||||
json = { { "prettierd", "prettier" } },
|
||||
javascript = { { "prettierd", "prettier" } },
|
||||
typescript = { { "prettierd", "prettier" } },
|
||||
javascriptreact = { { "prettierd", "prettier" } },
|
||||
|
|
@ -24,7 +25,7 @@ return {
|
|||
if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then
|
||||
return
|
||||
end
|
||||
return { timeout_ms = 500, lsp_fallback = true }
|
||||
return { timeout_ms = 2000, lsp_fallback = true }
|
||||
end,
|
||||
},
|
||||
config = function(_, opts)
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ return {
|
|||
|
||||
nmap("<leader>lr", vim.lsp.buf.rename, "Rename")
|
||||
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()
|
||||
vim.lsp.buf.format()
|
||||
end, "Format")
|
||||
|
|
@ -49,6 +50,7 @@ return {
|
|||
-- Enable the following language servers
|
||||
-- To see options and cofigurations: https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md
|
||||
local servers = {
|
||||
astro = {},
|
||||
bashls = {},
|
||||
cssls = {},
|
||||
dockerls = {},
|
||||
|
|
|
|||
|
|
@ -93,6 +93,18 @@ return {
|
|||
vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
|
||||
|
||||
-- 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,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue