Update all dotfiles
This commit is contained in:
@ -1,40 +1,48 @@
|
||||
{
|
||||
"LuaSnip": { "branch": "master", "commit": "33b06d72d220aa56a7ce80a0dd6f06c70cd82b9d" },
|
||||
"LuaSnip": { "branch": "master", "commit": "c1851d5c519611dfc451b6582961b2602e0af89b" },
|
||||
"avante.nvim": { "branch": "main", "commit": "d4672b7e1ee8bf94df5e1d3482e81418187f42aa" },
|
||||
"barbar.nvim": { "branch": "master", "commit": "53b5a2f34b68875898f0531032fbf090e3952ad7" },
|
||||
"cloak.nvim": { "branch": "main", "commit": "648aca6d33ec011dc3166e7af3b38820d01a71e4" },
|
||||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "99290b3ec1322070bcfb9e846450a46f6efa50f0" },
|
||||
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "a8912b88ce488f411177fc8aed358b04dc246d7b" },
|
||||
"cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" },
|
||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||
"cmp-path": { "branch": "main", "commit": "c6635aae33a50d6010bf1aa756ac2398a2d54c32" },
|
||||
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "5f808b5e4fef30bd8aca1b803b4e555da07fc412" },
|
||||
"image.nvim": { "branch": "master", "commit": "b991fc7f845bc6ab40c6ec00b39750dcd5190010" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "7e6c863bc7563efbdd757a310d17ebc95166cef3" },
|
||||
"dressing.nvim": { "branch": "master", "commit": "2d7c2db2507fa3c4956142ee607431ddb2828639" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
|
||||
"fzf-lua": { "branch": "main", "commit": "5af306b30f699513669efdf51cf50a6deab53968" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "e399f9748d7cfd8859747c8d6c4e9c8b4d50a1bd" },
|
||||
"golf": { "branch": "main", "commit": "abf1bc0c1c4a5482b4a4b36b950b49aaa0f39e69" },
|
||||
"image.nvim": { "branch": "master", "commit": "4c51d6202628b3b51e368152c053c3fb5c5f76f2" },
|
||||
"img-clip.nvim": { "branch": "main", "commit": "08a02e14c8c0d42fa7a92c30a98fd04d6993b35d" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
||||
"leetcode.nvim": { "branch": "master", "commit": "db7e1cd6b9191b34b4c1f2f96e4e3949cde9f951" },
|
||||
"lsp-zero.nvim": { "branch": "v3.x", "commit": "ab2a3413646fedd77aa0eab4214a6473e62f6a64" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "2a5bae925481f999263d6f5ed8361baef8df4f83" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "c6c686781f9841d855bf1b926e10aa5e19430a38" },
|
||||
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
|
||||
"neo-tree.nvim": { "branch": "v3.x", "commit": "a77af2e764c5ed4038d27d1c463fa49cd4794e07" },
|
||||
"nerdcommenter": { "branch": "master", "commit": "66c07e4083ab02ed2540ac289cc602c70b858c13" },
|
||||
"nui.nvim": { "branch": "main", "commit": "53e907ffe5eedebdca1cd503b00aa8692068ca46" },
|
||||
"nvim-autopairs": { "branch": "master", "commit": "b464658e9b880f463b9f7e6ccddd93fb0013f559" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "b555203ce4bd7ff6192e759af3362f9d217e8c89" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "ff2b85abaa810f6611233dbe6d31c07510ebf43d" },
|
||||
"nvim-notify": { "branch": "master", "commit": "fbef5d32be8466dd76544a257d3f3dce20082a07" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "17678b00fa5c2712890a0ec2e269d0a4de1207df" },
|
||||
"nvim-treesitter-context": { "branch": "master", "commit": "2bcf700b59bc92850ca83a1c02e86ba832e0fae0" },
|
||||
"nvim-ts-autotag": { "branch": "main", "commit": "1cca23c9da708047922d3895a71032bc0449c52d" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "63f552a7f59badc6e6b6d22e603150f0d5abebb7" },
|
||||
"nvim-window-picker": { "branch": "main", "commit": "41cfaa428577c53552200a404ae9b3a0b5719706" },
|
||||
"lsp-zero.nvim": { "branch": "v3.x", "commit": "77550f2f6cbf0959ef1583d845661af075f3442b" },
|
||||
"lspkind.nvim": { "branch": "master", "commit": "d79a1c3299ad0ef94e255d045bed9fa26025dab6" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "15884cee63a8c205334ab13ab1c891cd4d27101a" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "d39a75bbce4b8aad5d627191ea915179c77c100f" },
|
||||
"mason.nvim": { "branch": "main", "commit": "888d6ee499d8089a3a4be4309d239d6be1c1e6c0" },
|
||||
"neo-tree.nvim": { "branch": "v3.x", "commit": "f481de16a0eb59c985abac8985e3f2e2f75b4875" },
|
||||
"nerdcommenter": { "branch": "master", "commit": "02a3b6455fa07b61b9440a78732f1e9b7876c991" },
|
||||
"nui.nvim": { "branch": "main", "commit": "f535005e6ad1016383f24e39559833759453564e" },
|
||||
"nvim-autopairs": { "branch": "master", "commit": "4d74e75913832866aa7de35e4202463ddf6efd1b" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "ac1dfbe3b60e5e23a2cff90e3bd6a3bc88031a57" },
|
||||
"nvim-notify": { "branch": "master", "commit": "b5825cf9ee881dd8e43309c93374ed5b87b7a896" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "066fd6505377e3fd4aa219e61ce94c2b8bdb0b79" },
|
||||
"nvim-treesitter-context": { "branch": "master", "commit": "5c48b8ba1b0b7b25feb6e34e7eb293ea893aedc4" },
|
||||
"nvim-ts-autotag": { "branch": "main", "commit": "a1d526af391f6aebb25a8795cbc05351ed3620b5" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "d360317f8f509b99229bb31d42269987696df6ff" },
|
||||
"nvim-window-picker": { "branch": "main", "commit": "6382540b2ae5de6c793d4aa2e3fe6dbb518505ec" },
|
||||
"playground": { "branch": "master", "commit": "ba48c6a62a280eefb7c85725b0915e021a1a0749" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
|
||||
"refactoring.nvim": { "branch": "master", "commit": "2db6d378e873de31d18ade549c2edba64ff1c2e3" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
|
||||
"refactoring.nvim": { "branch": "master", "commit": "2be7ea3f10b7e59658f5abf6dffc50b5d61964d6" },
|
||||
"render-markdown.nvim": { "branch": "main", "commit": "a1b0988f5ab26698afb56b9c2f0525a4de1195c1" },
|
||||
"rest.nvim": { "branch": "main", "commit": "2ded89dbda1fd3c1430685ffadf2df8beb28336d" },
|
||||
"supermaven-nvim": { "branch": "main", "commit": "07d20fce48a5629686aefb0a7cd4b25e33947d50" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" },
|
||||
"tokyonight.nvim": { "branch": "main", "commit": "45d22cf0e1b93476d3b6d362d720412b3d34465c" },
|
||||
"trouble.nvim": { "branch": "main", "commit": "46cf952fc115f4c2b98d4e208ed1e2dce08c9bf6" },
|
||||
"undotree": { "branch": "master", "commit": "78b5241191852ffa9bb5da5ff2ee033160798c3b" },
|
||||
"vim-fugitive": { "branch": "master", "commit": "fcb4db52e7f65b95705aa58f0f2df1312c1f2df2" }
|
||||
"tokyonight.nvim": { "branch": "main", "commit": "057ef5d260c1931f1dffd0f052c685dcd14100a3" },
|
||||
"trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" },
|
||||
"undotree": { "branch": "master", "commit": "b951b87b46c34356d44aa71886aecf9dd7f5788a" },
|
||||
"vim-fugitive": { "branch": "master", "commit": "4a745ea72fa93bb15dd077109afbb3d1809383f2" }
|
||||
}
|
||||
|
126
configs/dotfiles/nvim/lua/gib_nvim/avante.lua
Normal file
126
configs/dotfiles/nvim/lua/gib_nvim/avante.lua
Normal file
@ -0,0 +1,126 @@
|
||||
require('avante').setup({
|
||||
--provider = "openai",
|
||||
--openai = {
|
||||
--endpoint = "https://api.openai.com/v1",
|
||||
--model = "gpt-4o", -- your desired model (or use gpt-4o, etc.)
|
||||
--timeout = 30000, -- Timeout in milliseconds, increase this for reasoning models
|
||||
--temperature = 0,
|
||||
--max_completion_tokens = 8192, -- Increase this to include reasoning tokens (for reasoning models)
|
||||
----reasoning_effort = "medium", -- low|medium|high, only used for reasoning models
|
||||
--},
|
||||
provider = "claude",
|
||||
mode = "agentic",
|
||||
auto_suggestions_provider = "claude",
|
||||
claude = {
|
||||
endpoint = "https://api.anthropic.com",
|
||||
model = "claude-3-7-sonnet-latest",
|
||||
temperature = 0,
|
||||
max_tokens = 4096,
|
||||
},
|
||||
dual_boost = {
|
||||
enabled = false,
|
||||
--first_provider = "openai",
|
||||
--second_provider = "claude",
|
||||
--prompt = "Based on the two reference outputs below, generate a response that incorporates elements from both but reflects your own judgment and unique perspective. Do not provide any explanation, just give the response directly. Reference Output 1: [{{provider1_output}}], Reference Output 2: [{{provider2_output}}]",
|
||||
--timeout = 60000, -- in milliseconds
|
||||
},
|
||||
behaviour = {
|
||||
--auto_suggestions = false,
|
||||
--auto_set_highlight_group = true,
|
||||
--auto_set_keymaps = true,
|
||||
--auto_apply_diff_after_generation = false,
|
||||
--support_paste_from_clipboard = false,
|
||||
--minimize_diff = true, -- Whether to remove unchanged lines when applying a code block
|
||||
--enable_token_counting = true, -- Whether to enable token counting. Default to true.
|
||||
},
|
||||
mappings = {
|
||||
--- @class AvanteConflictMappings
|
||||
diff = {
|
||||
ours = "co",
|
||||
theirs = "ct",
|
||||
all_theirs = "ca",
|
||||
both = "cb",
|
||||
cursor = "cc",
|
||||
next = "]x",
|
||||
prev = "[x",
|
||||
},
|
||||
suggestion = {
|
||||
accept = "<M-l>",
|
||||
next = "<M-]>",
|
||||
prev = "<M-[>",
|
||||
dismiss = "<C-]>",
|
||||
},
|
||||
jump = {
|
||||
next = "]]",
|
||||
prev = "[[",
|
||||
},
|
||||
submit = {
|
||||
normal = "<CR>",
|
||||
insert = "<C-s>",
|
||||
},
|
||||
cancel = {
|
||||
normal = { "<C-c>", "<Esc>", "q" },
|
||||
insert = { "<C-c>" },
|
||||
},
|
||||
sidebar = {
|
||||
apply_all = "A",
|
||||
apply_cursor = "a",
|
||||
retry_user_request = "r",
|
||||
edit_user_request = "e",
|
||||
switch_windows = "<Tab>",
|
||||
reverse_switch_windows = "<S-Tab>",
|
||||
remove_file = "d",
|
||||
add_file = "@",
|
||||
close = { "<Esc>", "q" },
|
||||
close_from_input = nil, -- e.g., { normal = "<Esc>", insert = "<C-d>" }
|
||||
},
|
||||
},
|
||||
hints = { enabled = true },
|
||||
windows = {
|
||||
---@type "right" | "left" | "top" | "bottom"
|
||||
position = "right", -- the position of the sidebar
|
||||
wrap = true, -- similar to vim.o.wrap
|
||||
width = 30, -- default % based on available width
|
||||
sidebar_header = {
|
||||
enabled = true, -- true, false to enable/disable the header
|
||||
align = "center", -- left, center, right for title
|
||||
rounded = true,
|
||||
},
|
||||
input = {
|
||||
prefix = "> ",
|
||||
height = 8, -- Height of the input window in vertical layout
|
||||
},
|
||||
edit = {
|
||||
border = "rounded",
|
||||
start_insert = true, -- Start insert mode when opening the edit window
|
||||
},
|
||||
ask = {
|
||||
floating = false, -- Open the 'AvanteAsk' prompt in a floating window
|
||||
start_insert = true, -- Start insert mode when opening the ask window
|
||||
border = "rounded",
|
||||
---@type "ours" | "theirs"
|
||||
focus_on_apply = "ours", -- which diff to focus after applying
|
||||
},
|
||||
},
|
||||
highlights = {
|
||||
---@type AvanteConflictHighlights
|
||||
diff = {
|
||||
current = "DiffText",
|
||||
incoming = "DiffAdd",
|
||||
},
|
||||
},
|
||||
--- @class AvanteConflictUserConfig
|
||||
diff = {
|
||||
autojump = true,
|
||||
---@type string | fun(): any
|
||||
list_opener = "copen",
|
||||
--- Override the 'timeoutlen' setting while hovering over a diff (see :help timeoutlen).
|
||||
--- Helps to avoid entering operator-pending mode with diff mappings starting with `c`.
|
||||
--- Disable by setting to -1.
|
||||
override_timeoutlen = 500,
|
||||
},
|
||||
suggestion = {
|
||||
debounce = 600,
|
||||
throttle = 600,
|
||||
},
|
||||
})
|
24
configs/dotfiles/nvim/lua/gib_nvim/image.lua
Normal file
24
configs/dotfiles/nvim/lua/gib_nvim/image.lua
Normal file
@ -0,0 +1,24 @@
|
||||
require('image').setup({
|
||||
backend = "kitty",
|
||||
integrations = {
|
||||
markdown = {
|
||||
enabled = true,
|
||||
clear_in_insert_mode = false,
|
||||
download_remote_images = true,
|
||||
only_render_image_at_cursor = false,
|
||||
filetypes = { "markdown", "vimwiki" }, -- markdown extensions (ie. quarto) can go here
|
||||
},
|
||||
neorg = {
|
||||
enabled = true,
|
||||
clear_in_insert_mode = false,
|
||||
download_remote_images = true,
|
||||
only_render_image_at_cursor = false,
|
||||
filetypes = { "norg" },
|
||||
},
|
||||
},
|
||||
max_width = nil,
|
||||
max_height = nil,
|
||||
max_width_window_percentage = nil,
|
||||
max_height_window_percentage = 50,
|
||||
kitty_method = "normal",
|
||||
})
|
@ -11,6 +11,7 @@ require("gib_nvim.nerdcomments")
|
||||
require("gib_nvim.refactoring")
|
||||
require("gib_nvim.telescope")
|
||||
require("gib_nvim.treesitter")
|
||||
require("gib_nvim.trouble")
|
||||
require("gib_nvim.undotree")
|
||||
require("gib_nvim.barbar")
|
||||
require("gib_nvim.avante")
|
||||
require("gib_nvim.image")
|
||||
|
@ -21,8 +21,44 @@ require("lazy").setup({
|
||||
priority = 1000,
|
||||
},
|
||||
{
|
||||
'folke/trouble.nvim', dependencies =
|
||||
{ 'nvim-tree/nvim-web-devicons' }
|
||||
"folke/trouble.nvim",
|
||||
dependencies = {
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
},
|
||||
opts = {}, -- for default options, refer to the configuration section for custom setup.
|
||||
cmd = "Trouble",
|
||||
keys = {
|
||||
{
|
||||
"<leader>xx",
|
||||
"<cmd>Trouble diagnostics toggle<cr>",
|
||||
desc = "Diagnostics (Trouble)",
|
||||
},
|
||||
{
|
||||
"<leader>xX",
|
||||
"<cmd>Trouble diagnostics toggle filter.buf=0<cr>",
|
||||
desc = "Buffer Diagnostics (Trouble)",
|
||||
},
|
||||
{
|
||||
"<leader>cs",
|
||||
"<cmd>Trouble symbols toggle focus=false<cr>",
|
||||
desc = "Symbols (Trouble)",
|
||||
},
|
||||
{
|
||||
"<leader>cl",
|
||||
"<cmd>Trouble lsp toggle focus=false win.position=right<cr>",
|
||||
desc = "LSP Definitions / references / ... (Trouble)",
|
||||
},
|
||||
{
|
||||
"<leader>xL",
|
||||
"<cmd>Trouble loclist toggle<cr>",
|
||||
desc = "Location List (Trouble)",
|
||||
},
|
||||
{
|
||||
"<leader>xQ",
|
||||
"<cmd>Trouble qflist toggle<cr>",
|
||||
desc = "Quickfix List (Trouble)",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
@ -58,6 +94,7 @@ require("lazy").setup({
|
||||
{'hrsh7th/cmp-path'},
|
||||
{'hrsh7th/cmp-buffer'},
|
||||
{'hrsh7th/cmp-nvim-lua'},
|
||||
{'onsails/lspkind.nvim'},
|
||||
{'L3MON4D3/LuaSnip'},
|
||||
{'saadparwaiz1/cmp_luasnip'},
|
||||
{'rafamadriz/friendly-snippets'},
|
||||
@ -70,7 +107,7 @@ require("lazy").setup({
|
||||
clear_suggestion = '<C-]>',
|
||||
accept_word = '<C-.>',
|
||||
},
|
||||
disable_inline_completion = false, -- for cmp
|
||||
disable_inline_completion = true, -- for cmp
|
||||
})
|
||||
end,
|
||||
},
|
||||
@ -112,23 +149,6 @@ require("lazy").setup({
|
||||
end,
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
require('neo-tree').setup({
|
||||
close_if_last_window = true,
|
||||
popup_border_style = "rounded",
|
||||
enable_git_status = true,
|
||||
enable_diagnostics = true,
|
||||
default_component_configs = {
|
||||
container = {
|
||||
enable_character_fade = true
|
||||
},
|
||||
indent = {
|
||||
indent_size = 2,
|
||||
padding = 1,
|
||||
}
|
||||
}
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
'romgrk/barbar.nvim', dependencies = {
|
||||
@ -177,29 +197,56 @@ require("lazy").setup({
|
||||
dependencies = {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
},
|
||||
opts = {
|
||||
backend = "kitty",
|
||||
integrations = {
|
||||
markdown = {
|
||||
enabled = true,
|
||||
clear_in_insert_mode = false,
|
||||
download_remote_images = true,
|
||||
only_render_image_at_cursor = false,
|
||||
filetypes = { "markdown", "vimwiki" }, -- markdown extensions (ie. quarto) can go here
|
||||
},
|
||||
neorg = {
|
||||
enabled = true,
|
||||
clear_in_insert_mode = false,
|
||||
download_remote_images = true,
|
||||
only_render_image_at_cursor = false,
|
||||
filetypes = { "norg" },
|
||||
},
|
||||
{
|
||||
"rest-nvim/rest.nvim",
|
||||
dependencies = {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = function (_, opts)
|
||||
opts.ensure_installed = opts.ensure_installed or {}
|
||||
table.insert(opts.ensure_installed, "http")
|
||||
end,
|
||||
}
|
||||
},
|
||||
{
|
||||
"yetone/avante.nvim",
|
||||
event = "VeryLazy",
|
||||
version = false, -- Never set this value to "*"! Never!
|
||||
build = "make", -- or `make BUILD_FROM_SOURCE=true`
|
||||
-- build = "powershell -ExecutionPolicy Bypass -File Build.ps1 -BuildFromSource false" -- for windows
|
||||
dependencies = {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
"stevearc/dressing.nvim",
|
||||
"nvim-lua/plenary.nvim",
|
||||
"MunifTanjim/nui.nvim",
|
||||
--- The below dependencies are optional,
|
||||
"hrsh7th/nvim-cmp", -- autocompletion for avante commands and mentions
|
||||
"ibhagwan/fzf-lua", -- for file_selector provider fzf
|
||||
"nvim-tree/nvim-web-devicons", -- or echasnovski/mini.icons
|
||||
{
|
||||
-- support for image pasting
|
||||
"HakonHarnes/img-clip.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = {
|
||||
-- recommended settings
|
||||
default = {
|
||||
embed_image_as_base64 = false,
|
||||
prompt_for_file_name = false,
|
||||
drag_and_drop = {
|
||||
insert_mode = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
max_width = nil,
|
||||
max_height = nil,
|
||||
max_width_window_percentage = nil,
|
||||
max_height_window_percentage = 50,
|
||||
kitty_method = "normal",
|
||||
{
|
||||
-- Make sure to set this up properly if you have lazy=true
|
||||
'MeanderingProgrammer/render-markdown.nvim',
|
||||
opts = {
|
||||
file_types = { "markdown", "Avante" },
|
||||
},
|
||||
ft = { "markdown", "Avante" },
|
||||
},
|
||||
},
|
||||
},
|
||||
{ 'vuciv/golf' },
|
||||
})
|
||||
|
@ -1,4 +1,5 @@
|
||||
local lsp = require('lsp-zero')
|
||||
local lspkind = require('lspkind')
|
||||
|
||||
lsp.preset('recommended')
|
||||
|
||||
@ -29,8 +30,6 @@ require('mason').setup({
|
||||
require('mason-lspconfig').setup({
|
||||
ensure_installed = {
|
||||
'bashls',
|
||||
'cssls',
|
||||
'cssmodules_ls',
|
||||
'docker_compose_language_service',
|
||||
'dockerls',
|
||||
'eslint',
|
||||
@ -40,7 +39,6 @@ require('mason-lspconfig').setup({
|
||||
'pyright',
|
||||
'rust_analyzer',
|
||||
'sqlls',
|
||||
'svelte',
|
||||
'tailwindcss',
|
||||
'yamlls',
|
||||
},
|
||||
@ -63,20 +61,63 @@ cmp.setup({
|
||||
end,
|
||||
},
|
||||
sources = {
|
||||
--{name = 'supermaven'},
|
||||
{name = 'supermaven'},
|
||||
{name = 'path'},
|
||||
{name = 'nvim_lsp'},
|
||||
{name = 'nvim_lua'},
|
||||
{name = 'luasnip', keyword_length = 2},
|
||||
{name = 'buffer', keyword_length = 3},
|
||||
},
|
||||
formatting = lsp.cmp_format(),
|
||||
formatting = {
|
||||
format = lspkind.cmp_format({
|
||||
mode = 'symbol',
|
||||
maxwidth = {
|
||||
menu = 50,
|
||||
abbr = 50,
|
||||
},
|
||||
symbol_map = {
|
||||
Supermaven = "",
|
||||
},
|
||||
ellipsis_char = '...',
|
||||
show_labelDetails = true,
|
||||
before = function (entry, vim_item)
|
||||
-- ...
|
||||
return vim_item
|
||||
end
|
||||
})
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
['<C-p>'] = cmp.mapping.select_prev_item(cmp_select),
|
||||
['<C-n>'] = cmp.mapping.select_next_item(cmp_select),
|
||||
-- Tab to select the next item
|
||||
['<Tab>'] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
if cmp.get_selected_entry() then
|
||||
cmp.confirm({select = false})
|
||||
else
|
||||
cmp.select_next_item()
|
||||
end
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { 'i', 's' }),
|
||||
|
||||
['<C-y>'] = cmp.mapping.confirm({ select = true }),
|
||||
['<C-Space>'] = cmp.mapping.complete(),
|
||||
['<C-e>'] = cmp.mapping.abort(),
|
||||
['<C-p>'] = cmp.mapping.select_prev_item(cmp_select),
|
||||
['<C-n>'] = cmp.mapping.select_next_item(cmp_select),
|
||||
['<C-d>'] = cmp.mapping.scroll_docs(4),
|
||||
['<C-u>'] = cmp.mapping.scroll_docs(-4),
|
||||
}),
|
||||
preselect = cmp.PreselectMode.Item,
|
||||
completion = {
|
||||
completeopt = 'menu,menuone,noinsert',
|
||||
}
|
||||
--mapping = cmp.mapping.preset.insert({
|
||||
--['<C-p>'] = cmp.mapping.select_prev_item(cmp_select),
|
||||
--['<C-n>'] = cmp.mapping.select_next_item(cmp_select),
|
||||
--['<C-y>'] = cmp.mapping.confirm({ select = true }),
|
||||
--['<C-Space>'] = cmp.mapping.complete(),
|
||||
--}),
|
||||
})
|
||||
|
||||
lsp.setup()
|
||||
|
@ -196,6 +196,30 @@ require("neo-tree").setup({
|
||||
-- window like netrw would, regardless of window.position
|
||||
-- "disabled", -- netrw left alone, neo-tree does not handle opening dirs
|
||||
use_libuv_file_watcher = false, -- This will use the OS level file watchers to detect changes
|
||||
|
||||
commands = {
|
||||
avante_add_files = function(state)
|
||||
local node = state.tree:get_node()
|
||||
local filepath = node:get_id()
|
||||
local relative_path = require('avante.utils').relative_path(filepath)
|
||||
|
||||
local sidebar = require('avante').get()
|
||||
|
||||
local open = sidebar:is_open()
|
||||
-- ensure avante sidebar is open
|
||||
if not open then
|
||||
require('avante.api').ask()
|
||||
sidebar = require('avante').get()
|
||||
end
|
||||
|
||||
sidebar.file_selector:add_selected_file(relative_path)
|
||||
|
||||
-- remove neo tree buffer
|
||||
if not open then
|
||||
sidebar.file_selector:remove_selected_file('neo-tree filesystem [1]')
|
||||
end
|
||||
end,
|
||||
},
|
||||
-- instead of relying on nvim autocmd events.
|
||||
window = {
|
||||
mappings = {
|
||||
@ -211,6 +235,7 @@ require("neo-tree").setup({
|
||||
["[g"] = "prev_git_modified",
|
||||
["]g"] = "next_git_modified",
|
||||
["o"] = { "show_help", nowait=false, config = { title = "Order by", prefix_key = "o" }},
|
||||
['oa'] = 'avante_add_files',
|
||||
["oc"] = { "order_by_created", nowait = false },
|
||||
["od"] = { "order_by_diagnostics", nowait = false },
|
||||
["og"] = { "order_by_git_status", nowait = false },
|
||||
@ -227,7 +252,6 @@ require("neo-tree").setup({
|
||||
},
|
||||
},
|
||||
|
||||
commands = {} -- Add a custom command or override a global one using the same function name
|
||||
},
|
||||
buffers = {
|
||||
follow_current_file = {
|
||||
|
@ -25,6 +25,8 @@ vim.opt.signcolumn = "yes"
|
||||
vim.opt.isfname:append("@-@")
|
||||
|
||||
vim.opt.updatetime = 50
|
||||
vim.cmd([[set list]])
|
||||
vim.cmd([[set listchars=trail:⋅]])
|
||||
|
||||
vim.opt.colorcolumn = "120"
|
||||
vim.o.background = "dark" -- or "light" for light mode
|
||||
|
@ -1,6 +1,38 @@
|
||||
require'nvim-treesitter.configs'.setup {
|
||||
-- A list of parser names, or "all"
|
||||
ensure_installed = { "bash", "c", "c_sharp", "cmake", "cpp", "css", "dockerfile", "git_config", "git_rebase", "gitattributes", "gitcommit", "gitignore", "haskell", "html", "java", "javascript", "jq", "json", "kotlin", "lua", "make", "matlab", "php", "python", "rust", "scala", "sql", "svelte", "swift", "typescript", "vimdoc", "yaml", "zig" },
|
||||
ensure_installed = {
|
||||
"bash",
|
||||
"c",
|
||||
"cmake",
|
||||
"cpp",
|
||||
"css",
|
||||
"dockerfile",
|
||||
"git_config",
|
||||
"git_rebase",
|
||||
"gitattributes",
|
||||
"gitcommit",
|
||||
"gitignore",
|
||||
"haskell",
|
||||
"html",
|
||||
"java",
|
||||
"javascript",
|
||||
"json",
|
||||
"kotlin",
|
||||
"lua",
|
||||
"make",
|
||||
"php",
|
||||
"python",
|
||||
"rust",
|
||||
"scala",
|
||||
"sql",
|
||||
"svelte",
|
||||
"swift",
|
||||
"tsx",
|
||||
"typescript",
|
||||
"vimdoc",
|
||||
"yaml",
|
||||
"zig"
|
||||
},
|
||||
|
||||
-- Install parsers synchronously (only applied to `ensure_installed`)
|
||||
sync_install = false,
|
||||
@ -9,14 +41,24 @@ require'nvim-treesitter.configs'.setup {
|
||||
-- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
|
||||
auto_install = true,
|
||||
|
||||
highlight = {
|
||||
-- `false` will disable the whole extension
|
||||
enable = true,
|
||||
|
||||
|
||||
highlight = {
|
||||
enable = true,
|
||||
disable = function(lang, buf)
|
||||
local max_filesize = 80 * 1024 -- 80 KB
|
||||
if lang == "tsx" then
|
||||
local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf))
|
||||
if ok and stats and stats.size > max_filesize then
|
||||
return true
|
||||
end
|
||||
end
|
||||
end,
|
||||
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
|
||||
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
|
||||
-- Using this option may slow down your editor, and you may see some duplicate highlights.
|
||||
-- Instead of true it can also be a list of languages
|
||||
additional_vim_regex_highlighting = false,
|
||||
--additional_vim_regex_highlighting = true,
|
||||
additional_vim_regex_highlighting = {"tsx"},
|
||||
},
|
||||
}
|
||||
|
Reference in New Issue
Block a user