comments(nvim): add tsserver variable annotation

This commit is contained in:
sankalp committed 2024-02-25 21:01:25 +05:45
1 parent 092b7acb18
commit ec912c4ca5
7 files changed
+134 -78

No files matched your search

+8 -6
View File
@@ -96,12 +96,14 @@ ac({ "BufNewFile", "BufRead" }, {
ac("ModeChanged", {
pattern = "*",
callback = function()
if
((vim.v.event.old_mode == "s" and vim.v.event.new_mode == "n") or vim.v.event.old_mode == "i")
and require("luasnip").session.current_nodes[vim.api.nvim_get_current_buf()]
and not require("luasnip").session.jump_active
then
require("luasnip").unlink_current()
if not vim.g.vscode then
if
((vim.v.event.old_mode == "s" and vim.v.event.new_mode == "n") or vim.v.event.old_mode == "i")
and require("luasnip").session.current_nodes[vim.api.nvim_get_current_buf()]
and not require("luasnip").session.jump_active
then
require("luasnip").unlink_current()
end
end
end,
})
+21 -1
View File
@@ -17,7 +17,8 @@ map("n", "<leader>l", "<Nop>")
map("n", "<leader>ll", "<cmd>Lazy<cr>", { desc = "Lazy" })
-- stylua: ignore start
map("n", "<leader>ld", function() vim.fn.system({ "xdg-open", "https://lazyvim.org" }) end, { desc = "LazyVim Docs" })
map("n", "<leader>lr", function() vim.fn.system({ "xdg-open", "https://github.com/LazyVim/LazyVim" }) end, { desc = "LazyVim Repo" })
map("n", "<leader>lr", function() vim.fn.system({ "xdg-open", "https://github.com/LazyVim/LazyVim" }) end,
{ desc = "LazyVim Repo" })
map("n", "<leader>lx", "<cmd>LazyExtras<cr>", { desc = "Extras" })
map("n", "<leader>lc", function() Util.news.changelog() end, { desc = "LazyVim Changelog" })
map("n", "<leader>lu", function() require("lazy").update() end, { desc = "Lazy Update" })
@@ -91,6 +92,25 @@ map("n", "[/", "?\\S\\zs\\s*╭<CR>zt", { desc = "Prev block comment" })
-- Plugin Info
map("n", "<leader>cif", "<cmd>LazyFormatInfo<cr>", { desc = "Formatting" })
map("n", "<leader>cic", "<cmd>ConformInfo<cr>", { desc = "Conform" })
local linters = function()
local linters_attached = require("lint").linters_by_ft[vim.bo.filetype]
local buf_linters = {}
if not linters_attached then
vim.notify("No linters attached", vim.log.levels.WARN, { title = "Linter" })
return
end
for _, linter in pairs(linters_attached) do
table.insert(buf_linters, linter)
end
local unique_client_names = table.concat(buf_linters, ", ")
local linters = string.format("%s", unique_client_names)
vim.notify(linters, vim.log.levels.INFO, { title = "Linter" })
end
map("n", "<leader>ciL", linters, { desc = "Lint" })
map("n", "<leader>cir", "<cmd>LazyRoot<cr>", { desc = "Root" })
-- U for redo