feat(nvim): add doc snippets to a lot of languages
This commit is contained in:
1 parent
601b313682
commit
f28cc5a7ec
4 files changed
+37
-32
No files matched your search
@@ -1,16 +1,6 @@
|
||||
return {
|
||||
"uga-rosa/ccc.nvim",
|
||||
init = function()
|
||||
vim.api.nvim_create_autocmd("BufReadPost", {
|
||||
callback = function()
|
||||
local firstline = vim.api.nvim_buf_get_lines(0, 0, 1, false)[1]
|
||||
if vim.endswith(firstline, "vim-pseudo-modeline: buffer_has_colors") then
|
||||
vim.cmd.CccHighlighterEnable()
|
||||
end
|
||||
end,
|
||||
})
|
||||
end,
|
||||
ft = { "css", "scss", "sh" },
|
||||
ft = { "html", "javascript", "typescript", "javascriptreact", "typescriptreact", "css", "scss", "sh" },
|
||||
cmd = { "CccPick", "CccConvert", "CccHighlighterEnable", "CccHighlighterDisable", "CccHighlighterToggle" },
|
||||
keys = {
|
||||
{ "<leader>up", "<cmd>CccHighlighterToggle<cr>", desc = "Toggle Paint/Colorizer" },
|
||||
|
||||
@@ -20,6 +20,7 @@ return {
|
||||
executeCommandIfExists(":IBLDisable")
|
||||
Util.toggle.inlay_hints()
|
||||
executeCommandIfExists(":Gitsigns toggle_current_line_blame")
|
||||
executeCommandIfExists(":CccHighlighterDisable")
|
||||
end,
|
||||
on_close = function()
|
||||
vim.opt.laststatus = 3
|
||||
@@ -30,6 +31,7 @@ return {
|
||||
executeCommandIfExists(":IBLEnable")
|
||||
Util.toggle.inlay_hints()
|
||||
executeCommandIfExists(":Gitsigns toggle_current_line_blame")
|
||||
executeCommandIfExists(":CccHighlighterEnable")
|
||||
end,
|
||||
},
|
||||
},
|
||||
|
||||
@@ -4,6 +4,19 @@ return {
|
||||
"rafamadriz/friendly-snippets",
|
||||
config = function()
|
||||
require("luasnip.loaders.from_vscode").lazy_load()
|
||||
require("luasnip").filetype_extend("typescript", { "tsdoc" })
|
||||
require("luasnip").filetype_extend("javascript", { "jsdoc" })
|
||||
require("luasnip").filetype_extend("lua", { "luadoc" })
|
||||
require("luasnip").filetype_extend("python", { "pydoc" })
|
||||
require("luasnip").filetype_extend("rust", { "rustdoc" })
|
||||
require("luasnip").filetype_extend("cs", { "csharpdoc" })
|
||||
require("luasnip").filetype_extend("java", { "javadoc" })
|
||||
require("luasnip").filetype_extend("c", { "cdoc" })
|
||||
require("luasnip").filetype_extend("cpp", { "cppdoc" })
|
||||
require("luasnip").filetype_extend("php", { "phpdoc" })
|
||||
require("luasnip").filetype_extend("kotlin", { "kdoc" })
|
||||
require("luasnip").filetype_extend("ruby", { "rdoc" })
|
||||
require("luasnip").filetype_extend("sh", { "shelldoc" })
|
||||
require("luasnip.loaders.from_vscode").lazy_load({ paths = vim.fn.stdpath("config") .. "/snippets" })
|
||||
end,
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user