feat: updates to neovim config
This commit is contained in:
@@ -5,16 +5,16 @@ vim.api.nvim_create_autocmd({ "FocusGained", "BufEnter", "CursorHold", "CursorHo
|
|||||||
})
|
})
|
||||||
|
|
||||||
-- get terminal to follow directory
|
-- get terminal to follow directory
|
||||||
vim.api.nvim_create_autocmd({ 'TermRequest' }, {
|
-- vim.api.nvim_create_autocmd({ 'TermRequest' }, {
|
||||||
desc = 'Handles OSC 7 dir change requests',
|
-- desc = 'Handles OSC 7 dir change requests',
|
||||||
callback = function(ev)
|
-- callback = function(ev)
|
||||||
local pwd, n = string.gsub(ev.data.sequence, '\027]7;file://[^/]*', '')
|
-- local pwd, n = string.gsub(ev.data.sequence, '\027]7;file://[^/]*', '')
|
||||||
if n <= 0 then return end
|
-- if n <= 0 then return end
|
||||||
if vim.fn.isdirectory(pwd) == 0 then return end
|
-- if vim.fn.isdirectory(pwd) == 0 then return end
|
||||||
if vim.api.nvim_get_current_buf() ~= ev.buf then return end
|
-- if vim.api.nvim_get_current_buf() ~= ev.buf then return end
|
||||||
vim.cmd.cd(pwd)
|
-- vim.cmd.cd(pwd)
|
||||||
end
|
-- end
|
||||||
})
|
-- })
|
||||||
|
|
||||||
-- Check if we need to reload the file when it changed
|
-- Check if we need to reload the file when it changed
|
||||||
vim.api.nvim_create_autocmd({ "FocusGained", "TermClose", "TermLeave" }, {
|
vim.api.nvim_create_autocmd({ "FocusGained", "TermClose", "TermLeave" }, {
|
||||||
|
|||||||
@@ -113,6 +113,7 @@ vim.filetype.add({
|
|||||||
})
|
})
|
||||||
|
|
||||||
vim.pack.add({
|
vim.pack.add({
|
||||||
|
{ src = 'https://github.com/3rd/image.nvim' },
|
||||||
{ src = "https://github.com/folke/snacks.nvim" },
|
{ src = "https://github.com/folke/snacks.nvim" },
|
||||||
{ src = "https://github.com/folke/trouble.nvim" },
|
{ src = "https://github.com/folke/trouble.nvim" },
|
||||||
{ src = "https://github.com/olimorris/codecompanion.nvim" },
|
{ src = "https://github.com/olimorris/codecompanion.nvim" },
|
||||||
@@ -137,7 +138,6 @@ vim.pack.add({
|
|||||||
{ src = 'https://github.com/akinsho/toggleterm.nvim' },
|
{ src = 'https://github.com/akinsho/toggleterm.nvim' },
|
||||||
{ src = 'https://github.com/al1-ce/just.nvim' },
|
{ src = 'https://github.com/al1-ce/just.nvim' },
|
||||||
{ src = 'https://github.com/cairijun/codecompanion-agentskills.nvim' },
|
{ src = 'https://github.com/cairijun/codecompanion-agentskills.nvim' },
|
||||||
{ src = 'https://github.com/cairijun/codecompanion-agentskills.nvim' },
|
|
||||||
{ src = 'https://github.com/carlos-algms/agentic.nvim' },
|
{ src = 'https://github.com/carlos-algms/agentic.nvim' },
|
||||||
{ src = 'https://github.com/chipsenkbeil/org-roam.nvim' },
|
{ src = 'https://github.com/chipsenkbeil/org-roam.nvim' },
|
||||||
{ src = 'https://github.com/christoomey/vim-tmux-navigator' },
|
{ src = 'https://github.com/christoomey/vim-tmux-navigator' },
|
||||||
@@ -149,7 +149,6 @@ vim.pack.add({
|
|||||||
{ src = 'https://github.com/folke/todo-comments.nvim' },
|
{ src = 'https://github.com/folke/todo-comments.nvim' },
|
||||||
{ src = 'https://github.com/folke/which-key.nvim' },
|
{ src = 'https://github.com/folke/which-key.nvim' },
|
||||||
{ src = 'https://github.com/franco-ruggeri/codecompanion-spinner.nvim' },
|
{ src = 'https://github.com/franco-ruggeri/codecompanion-spinner.nvim' },
|
||||||
{ src = 'https://github.com/franco-ruggeri/codecompanion-spinner.nvim' },
|
|
||||||
{ src = 'https://github.com/hat0uma/csvview.nvim' },
|
{ src = 'https://github.com/hat0uma/csvview.nvim' },
|
||||||
{ src = 'https://github.com/hedyhli/outline.nvim' },
|
{ src = 'https://github.com/hedyhli/outline.nvim' },
|
||||||
{ src = 'https://github.com/iamcco/markdown-preview.nvim' },
|
{ src = 'https://github.com/iamcco/markdown-preview.nvim' },
|
||||||
@@ -159,6 +158,7 @@ vim.pack.add({
|
|||||||
{ src = 'https://github.com/lervag/vimtex' },
|
{ src = 'https://github.com/lervag/vimtex' },
|
||||||
{ src = 'https://github.com/lewis6991/gitsigns.nvim' },
|
{ src = 'https://github.com/lewis6991/gitsigns.nvim' },
|
||||||
{ src = 'https://github.com/mbbill/undotree' },
|
{ src = 'https://github.com/mbbill/undotree' },
|
||||||
|
{ src = 'https://github.com/SjB/meow.review.nvim', version = 'fix-invalid-buffer-id' },
|
||||||
{ src = 'https://github.com/mfussenegger/nvim-ansible' },
|
{ src = 'https://github.com/mfussenegger/nvim-ansible' },
|
||||||
{ src = 'https://github.com/mfussenegger/nvim-dap' },
|
{ src = 'https://github.com/mfussenegger/nvim-dap' },
|
||||||
{ src = 'https://github.com/mistweaverco/kulala.nvim' },
|
{ src = 'https://github.com/mistweaverco/kulala.nvim' },
|
||||||
@@ -184,6 +184,7 @@ vim.pack.add({
|
|||||||
{ src = 'https://github.com/nvim-treesitter/nvim-treesitter-context' },
|
{ src = 'https://github.com/nvim-treesitter/nvim-treesitter-context' },
|
||||||
{ src = 'https://github.com/nvim-treesitter/nvim-treesitter-context' },
|
{ src = 'https://github.com/nvim-treesitter/nvim-treesitter-context' },
|
||||||
{ src = 'https://github.com/nvim-treesitter/nvim-treesitter-textobjects', version = 'main' },
|
{ src = 'https://github.com/nvim-treesitter/nvim-treesitter-textobjects', version = 'main' },
|
||||||
|
{ src = 'https://github.com/romus204/tree-sitter-manager.nvim' },
|
||||||
{ src = 'https://github.com/obsidian-nvim/obsidian.nvim' },
|
{ src = 'https://github.com/obsidian-nvim/obsidian.nvim' },
|
||||||
{ src = 'https://github.com/otavioschwanck/arrow.nvim' },
|
{ src = 'https://github.com/otavioschwanck/arrow.nvim' },
|
||||||
{ src = 'https://github.com/rafamadriz/friendly-snippets' },
|
{ src = 'https://github.com/rafamadriz/friendly-snippets' },
|
||||||
@@ -192,6 +193,7 @@ vim.pack.add({
|
|||||||
{ src = 'https://github.com/ravitemer/codecompanion-history.nvim' },
|
{ src = 'https://github.com/ravitemer/codecompanion-history.nvim' },
|
||||||
{ src = 'https://github.com/rcarriga/nvim-dap-ui' },
|
{ src = 'https://github.com/rcarriga/nvim-dap-ui' },
|
||||||
{ src = 'https://github.com/salkin-mada/openscad.nvim' },
|
{ src = 'https://github.com/salkin-mada/openscad.nvim' },
|
||||||
|
{ src = 'https://github.com/sheng-tse/jupynvim' },
|
||||||
{ src = 'https://github.com/sindrets/diffview.nvim' },
|
{ src = 'https://github.com/sindrets/diffview.nvim' },
|
||||||
{ src = 'https://github.com/stevearc/conform.nvim' },
|
{ src = 'https://github.com/stevearc/conform.nvim' },
|
||||||
{ src = 'https://github.com/stevearc/overseer.nvim' },
|
{ src = 'https://github.com/stevearc/overseer.nvim' },
|
||||||
|
|||||||
@@ -253,7 +253,9 @@ codecompanion.setup({
|
|||||||
-- },
|
-- },
|
||||||
agentskills = {
|
agentskills = {
|
||||||
opts = {
|
opts = {
|
||||||
{ "~/Documents/ai-skills", recursive = true },
|
paths = {
|
||||||
|
{ "~/.agents/skills", recursive = true },
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
-- vectorcode = { lazy = true },
|
-- vectorcode = { lazy = true },
|
||||||
@@ -265,10 +267,10 @@ codecompanion.setup({
|
|||||||
save_chat_keymap = "ghs",
|
save_chat_keymap = "ghs",
|
||||||
picker = "snacks",
|
picker = "snacks",
|
||||||
dir_to_save = vim.env.HOME .. "/Documents/ai-history",
|
dir_to_save = vim.env.HOME .. "/Documents/ai-history",
|
||||||
-- title_generation_opts = {
|
title_generation_opts = {
|
||||||
-- adapter = "copilot",
|
adapter = "copilot",
|
||||||
-- model = "gpt-5-mini",
|
model = "gpt-5-mini",
|
||||||
-- },
|
},
|
||||||
summary = {
|
summary = {
|
||||||
create_summary_keymap = "ghc",
|
create_summary_keymap = "ghc",
|
||||||
browse_summaries_keymap = "ghb",
|
browse_summaries_keymap = "ghb",
|
||||||
@@ -312,6 +314,7 @@ codecompanion.setup({
|
|||||||
"fetch",
|
"fetch",
|
||||||
"grep_search",
|
"grep_search",
|
||||||
"memory",
|
"memory",
|
||||||
|
"agent_skills",
|
||||||
-- "ddgr_search",
|
-- "ddgr_search",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -519,7 +522,8 @@ codecompanion.setup({
|
|||||||
},
|
},
|
||||||
-- adapter = { name = "abacus", model = "route-llm" },
|
-- adapter = { name = "abacus", model = "route-llm" },
|
||||||
-- adapter = { name = "opencode", model = "github-copilot/gpt-5.2-codex" },
|
-- adapter = { name = "opencode", model = "github-copilot/gpt-5.2-codex" },
|
||||||
adapter = { name = "copilot", model = "gpt-5-mini" },
|
-- adapter = { name = "copilot", model = "gpt-5-mini" },
|
||||||
|
adapter = { name = "goose" },
|
||||||
},
|
},
|
||||||
inline = {
|
inline = {
|
||||||
-- adapter = { name = "abacus", model = "route-llm" },
|
-- adapter = { name = "abacus", model = "route-llm" },
|
||||||
|
|||||||
+29
-13
@@ -1,5 +1,4 @@
|
|||||||
|
vim.keymap.set("i", "<C-.>", function()
|
||||||
vim.keymap.set("i", "<C-.>", function()
|
|
||||||
if not vim.lsp.inline_completion.get() then
|
if not vim.lsp.inline_completion.get() then
|
||||||
return "<C-.>"
|
return "<C-.>"
|
||||||
end
|
end
|
||||||
@@ -68,7 +67,7 @@ local servers = {
|
|||||||
},
|
},
|
||||||
diagnostics = {
|
diagnostics = {
|
||||||
disable = { 'missing-fields' },
|
disable = { 'missing-fields' },
|
||||||
globals = { 'vim', 'require' },
|
globals = { 'vim', 'require' },
|
||||||
},
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
@@ -101,14 +100,29 @@ local servers = {
|
|||||||
["harper-ls"] = {
|
["harper-ls"] = {
|
||||||
linters = {
|
linters = {
|
||||||
SentenceCapitalization = true,
|
SentenceCapitalization = true,
|
||||||
SpellCheck = true
|
SpellCheck = true
|
||||||
},
|
},
|
||||||
dialect = "Canadian"
|
dialect = "Canadian"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
-- csharp_ls = {},
|
-- csharp_ls = {},
|
||||||
zls = {},
|
pyright = {
|
||||||
|
settings = {
|
||||||
|
pyright = {
|
||||||
|
disableOrganizeImports = true,
|
||||||
|
disableTaggedHints = true,
|
||||||
|
},
|
||||||
|
python = {
|
||||||
|
analysis = {
|
||||||
|
diagnosticSeverityOverrides = {
|
||||||
|
reportUndefinedVariable = "none",
|
||||||
|
reportUnusedExpression = "none",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
clangd = {
|
clangd = {
|
||||||
settings = {
|
settings = {
|
||||||
["clang"] = {
|
["clang"] = {
|
||||||
@@ -116,7 +130,8 @@ local servers = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
rust_analyzer= {
|
ruff = {},
|
||||||
|
rust_analyzer = {
|
||||||
settings = {
|
settings = {
|
||||||
['rust-analyzer'] = {
|
['rust-analyzer'] = {
|
||||||
cargo = {
|
cargo = {
|
||||||
@@ -145,11 +160,12 @@ local servers = {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
ts_ls= {},
|
ts_ls = {},
|
||||||
html= {},
|
html = {},
|
||||||
eslint= {},
|
eslint = {},
|
||||||
jsonls= {},
|
jsonls = {},
|
||||||
jdtls= {},
|
jdtls = {},
|
||||||
|
zls = {},
|
||||||
copilot = {
|
copilot = {
|
||||||
-- settings = {
|
-- settings = {
|
||||||
-- ['copilot'] = {
|
-- ['copilot'] = {
|
||||||
@@ -179,7 +195,7 @@ local servers = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
local ensure_installed = vim.tbl_keys(servers or {})
|
local ensure_installed = vim.tbl_keys(servers or {})
|
||||||
require('mason-tool-installer').setup ({ ensure_installed = ensure_installed })
|
require('mason-tool-installer').setup({ ensure_installed = ensure_installed })
|
||||||
|
|
||||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||||
capabilities = vim.tbl_deep_extend('force', capabilities, require('blink.cmp').get_lsp_capabilities({}, false))
|
capabilities = vim.tbl_deep_extend('force', capabilities, require('blink.cmp').get_lsp_capabilities({}, false))
|
||||||
@@ -205,7 +221,7 @@ vim.lsp.inline_completion.enable();
|
|||||||
-- vim.lsp.enable("rust-analyzer", false)
|
-- vim.lsp.enable("rust-analyzer", false)
|
||||||
|
|
||||||
|
|
||||||
require ('mason-nvim-dap').setup({
|
require('mason-nvim-dap').setup({
|
||||||
handlers = {
|
handlers = {
|
||||||
function(config)
|
function(config)
|
||||||
-- all sources with no handler get passed here
|
-- all sources with no handler get passed here
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
require("meow.review").setup({
|
||||||
|
-- Your custom configuration goes here
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.keymap.set({ "n", "v" }, "<leader>ra", "<Plug>(MeowReviewAdd)", { desc = "Add Review Comment" })
|
||||||
|
vim.keymap.set({ "n", "v" }, "<leader>rd", "<Plug>(MeowReviewDelete)", { desc = "Delete Review Comment" })
|
||||||
|
vim.keymap.set({ 'n' }, "<leader>re", "<Plug>(MeowReviewEdit)", { desc = "Edit Review Comment" })
|
||||||
|
vim.keymap.set({ 'n' }, "<leader>rv", "<Plug>(MeowReviewView)", { desc = "View Review Comment" })
|
||||||
|
vim.keymap.set({ 'n' }, "<leader>rE", "<Plug>(MeowReviewExport)", { desc = "Export Review" })
|
||||||
|
vim.keymap.set({ 'n' }, "<leader>rX", "<Plug>(MeowReviewExportAndClear)", { desc = "Export and Clear" })
|
||||||
|
vim.keymap.set({ 'n' }, "<leader>rf", "<Plug>(MeowReviewExportFile)", { desc = "Export Current File" })
|
||||||
|
vim.keymap.set({ 'n' }, "<leader>rc", "<Plug>(MeowReviewClear)", { desc = "Clear All Comments" })
|
||||||
|
vim.keymap.set({ 'n' }, "<leader>rg", "<Plug>(MeowReviewGoto)", { desc = "Go to Review Comment" })
|
||||||
|
vim.keymap.set({ 'n' }, "<leader>rG", "<Plug>(MeowReviewGotoFile)", { desc = "Go to Comment in File" })
|
||||||
|
vim.keymap.set({ 'n' }, "<leader>rt", "<Plug>(MeowReviewGotoType)", { desc = "Go to Comment by Type" })
|
||||||
|
vim.keymap.set({ 'n' }, "<leader>rR", "<Plug>(MeowReviewResolve)", { desc = "Resolve Comment" })
|
||||||
|
vim.keymap.set({ 'n' }, "<leader>rA", "<Plug>(MeowReviewResolveAll)", { desc = "Resolve All Comments" })
|
||||||
|
vim.keymap.set({ 'n' }, "<leader>rr", "<Plug>(MeowReviewReload)", { desc = "Reload Review" })
|
||||||
|
vim.keymap.set({ 'n' }, "]r", "<Plug>(MeowReviewNext)", { desc = "Next Review Comment" })
|
||||||
|
vim.keymap.set({ 'n' }, "[r", "<Plug>(MeowReviewPrev)", { desc = "Previous Review Comment" })
|
||||||
@@ -72,4 +72,6 @@ require('mini.files').setup({
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
require('mini.sessions').setup()
|
require('mini.sessions').setup({
|
||||||
|
directory = '~/.cache/nvim/sessions',
|
||||||
|
})
|
||||||
|
|||||||
@@ -27,8 +27,8 @@ require("obsidian").setup({
|
|||||||
tags = "",
|
tags = "",
|
||||||
},
|
},
|
||||||
completion = {
|
completion = {
|
||||||
nvim_cmp = false,
|
-- nvim_cmp = false,
|
||||||
blink = true,
|
-- blink = true,
|
||||||
min_chars = 2,
|
min_chars = 2,
|
||||||
},
|
},
|
||||||
link = {
|
link = {
|
||||||
|
|||||||
@@ -1,3 +1,8 @@
|
|||||||
|
require("persistence").setup({
|
||||||
|
dir = vim.fn.expand(vim.fn.stdpath("state") .. "/sessions/"), -- directory where session files are saved
|
||||||
|
options = { "buffers", "curdir", "tabpages", "winsize" }, -- sessionoptions used when saving sessions
|
||||||
|
})
|
||||||
|
|
||||||
vim.keymap.set('n', "<leader>xr", function() require("persistence").load() end, { desc = "Restore Session" })
|
vim.keymap.set('n', "<leader>xr", function() require("persistence").load() end, { desc = "Restore Session" })
|
||||||
vim.keymap.set('n', "<leader>xs", function() require("persistence").save() end, { desc = "Save Session" })
|
vim.keymap.set('n', "<leader>xs", function() require("persistence").save() end, { desc = "Save Session" })
|
||||||
vim.keymap.set('n', "<leader>xl", function() require("persistence").load({ last = true }) end, { desc = "Restore Last Session" })
|
vim.keymap.set('n', "<leader>xl", function() require("persistence").load({ last = true }) end, { desc = "Restore Last Session" })
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ require('snacks').setup({
|
|||||||
dashboard = { enabled = false },
|
dashboard = { enabled = false },
|
||||||
explorer = { enabled = false },
|
explorer = { enabled = false },
|
||||||
image = {
|
image = {
|
||||||
enabled = true,
|
enabled = false,
|
||||||
inline = false,
|
inline = false,
|
||||||
scale = 3, -- nil | 1 (default) | 2 | 3 | ...
|
scale = 3, -- nil | 1 (default) | 2 | 3 | ...
|
||||||
doc = {
|
doc = {
|
||||||
|
|||||||
@@ -17,3 +17,4 @@ require("toggleterm").setup({
|
|||||||
})
|
})
|
||||||
|
|
||||||
vim.keymap.set('t', "<esc><esc>", "<c-\\><c-n>", { desc = "Escape input" })
|
vim.keymap.set('t', "<esc><esc>", "<c-\\><c-n>", { desc = "Escape input" })
|
||||||
|
vim.keymap.set('t', "<leader><esc>", "<c-\\><c-n>", { desc = "Escape input" })
|
||||||
|
|||||||
@@ -10,11 +10,15 @@ require("just").setup({
|
|||||||
notify = vim.notify, -- what to use to show messages/errors
|
notify = vim.notify, -- what to use to show messages/errors
|
||||||
})
|
})
|
||||||
require('img-clip').setup()
|
require('img-clip').setup()
|
||||||
|
require('image').setup({
|
||||||
|
backend = "sixel"
|
||||||
|
})
|
||||||
|
|
||||||
require('sshfs').setup({
|
require('sshfs').setup({
|
||||||
mounts = {
|
mounts = {
|
||||||
base_dir = vim.fn.expand("$HOME") .. "/Public", -- where remote mounts are created
|
base_dir = vim.fn.expand("$HOME") .. "/Public", -- where remote mounts are created
|
||||||
},
|
},
|
||||||
lead_prefix = "<leader>r",
|
lead_prefix = "<leader>t",
|
||||||
-- Refer to the configuration section below
|
-- Refer to the configuration section below
|
||||||
-- or leave empty for defaults
|
-- or leave empty for defaults
|
||||||
})
|
})
|
||||||
@@ -55,6 +59,21 @@ require('trouble').setup({
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd('PackChanged', {
|
||||||
|
callback = function()
|
||||||
|
local core = vim.fn.stdpath("data") .. "/site/pack/core/opt/jupynvim/core"
|
||||||
|
vim.fn.system({
|
||||||
|
"cargo", "build", "--release",
|
||||||
|
"--manifest-path", core .. "/Cargo.toml",
|
||||||
|
})
|
||||||
|
end
|
||||||
|
})
|
||||||
|
|
||||||
|
require("jupynvim").setup({
|
||||||
|
log_level = "debug",
|
||||||
|
image_renderer = "placeholder", -- "placeholder", "kitty", or "chafa"
|
||||||
|
})
|
||||||
|
|
||||||
require("overseer").setup({
|
require("overseer").setup({
|
||||||
templates = { "builtin", "user" },
|
templates = { "builtin", "user" },
|
||||||
component_aliases = {
|
component_aliases = {
|
||||||
|
|||||||
@@ -1,65 +1,73 @@
|
|||||||
|
require("tree-sitter-manager").setup({
|
||||||
|
-- Default Options
|
||||||
|
-- ensure_installed = {}, -- list of parsers to install at the start of a neovim session
|
||||||
|
-- border = nil, -- border style for the window (e.g. "rounded", "single"), if nil, use the default border style defined by 'vim.o.winborder'. See :h 'winborder' for more info.
|
||||||
|
-- auto_install = false, -- if enabled, install missing parsers when editing a new file
|
||||||
|
-- highlight = true, -- treesitter highlighting is enabled by default
|
||||||
|
-- languages = {}, -- override or add new parser sources
|
||||||
|
})
|
||||||
|
|
||||||
vim.g.no_plugin_maps = true
|
-- vim.g.no_plugin_maps = true
|
||||||
local ts_parsers = {
|
-- local ts_parsers = {
|
||||||
"bash",
|
-- "bash",
|
||||||
"dockerfile",
|
-- "dockerfile",
|
||||||
"git_config", "git_rebase", "gitattributes", "gitcommit", "gitignore",
|
-- "git_config", "git_rebase", "gitattributes", "gitcommit", "gitignore",
|
||||||
"go", "gomod", "gosum",
|
-- "go", "gomod", "gosum",
|
||||||
"json", "toml", "yaml",
|
-- "json", "toml", "yaml",
|
||||||
"lua",
|
-- "lua",
|
||||||
"make",
|
-- "make",
|
||||||
"markdown",
|
-- "markdown",
|
||||||
"python",
|
-- "python",
|
||||||
"terraform",
|
-- "terraform",
|
||||||
"vim", "vimdoc",
|
-- "vim", "vimdoc",
|
||||||
'c',
|
-- 'c',
|
||||||
"lua",
|
-- "lua",
|
||||||
"markdown",
|
-- "markdown",
|
||||||
"markdown_inline",
|
-- "markdown_inline",
|
||||||
"query",
|
-- "query",
|
||||||
"html", "xml",
|
-- "html", "xml",
|
||||||
"zig",
|
-- "zig",
|
||||||
"typescript", "javascript", "svelte",
|
-- "typescript", "javascript", "svelte",
|
||||||
"regex",
|
-- "regex",
|
||||||
"rust",
|
-- "rust",
|
||||||
"http",
|
-- "http",
|
||||||
}
|
-- }
|
||||||
|
--
|
||||||
|
-- local nts = require("nvim-treesitter")
|
||||||
|
-- nts.install(ts_parsers)
|
||||||
|
-- -- vim.api.nvim_create_autocmd('PackChanged', {
|
||||||
|
-- -- callback = function()
|
||||||
|
-- -- nts.update()
|
||||||
|
-- -- end
|
||||||
|
-- -- })
|
||||||
|
--
|
||||||
|
vim.api.nvim_create_autocmd("FileType", { -- enable treesitter highlighting and indents
|
||||||
|
callback = function(args)
|
||||||
|
local filetype = args.match
|
||||||
|
local lang = vim.treesitter.language.get_lang(filetype)
|
||||||
|
if vim.treesitter.language.add(lang) then
|
||||||
|
vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()"
|
||||||
|
vim.treesitter.start()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
})
|
||||||
|
|
||||||
local nts = require("nvim-treesitter")
|
-- vim.api.nvim_create_autocmd('FileType', {
|
||||||
nts.install(ts_parsers)
|
-- pattern = ts_parsers,
|
||||||
-- vim.api.nvim_create_autocmd('PackChanged', {
|
-- callback = function()
|
||||||
-- callback = function()
|
-- vim.treesitter.start()
|
||||||
-- nts.update()
|
-- end,
|
||||||
-- end
|
-- })
|
||||||
-- })
|
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd("FileType", { -- enable treesitter highlighting and indents
|
-- require('ts-context-commentstring').setup({
|
||||||
callback = function(args)
|
-- enable_autocmd = false
|
||||||
local filetype = args.match
|
-- })
|
||||||
local lang = vim.treesitter.language.get_lang(filetype)
|
|
||||||
if vim.treesitter.language.add(lang) then
|
|
||||||
vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()"
|
|
||||||
vim.treesitter.start()
|
|
||||||
end
|
|
||||||
end
|
|
||||||
})
|
|
||||||
|
|
||||||
-- vim.api.nvim_create_autocmd('FileType', {
|
require("treesitter-context").setup({
|
||||||
-- pattern = ts_parsers,
|
mode = "cursor",
|
||||||
-- callback = function()
|
max_lines = 3,
|
||||||
-- vim.treesitter.start()
|
multiline_threshold = 1,
|
||||||
-- end,
|
separator = '-',
|
||||||
-- })
|
min_window_height = 20,
|
||||||
|
line_numbers = true,
|
||||||
-- require('ts-context-commentstring').setup({
|
})
|
||||||
-- enable_autocmd = false
|
|
||||||
-- })
|
|
||||||
|
|
||||||
require("treesitter-context").setup({
|
|
||||||
mode = "cursor",
|
|
||||||
max_lines = 3,
|
|
||||||
multiline_threshold = 1,
|
|
||||||
separator = '-',
|
|
||||||
min_window_height = 20,
|
|
||||||
line_numbers = true,
|
|
||||||
})
|
|
||||||
|
|||||||
Reference in New Issue
Block a user