no tabs minimizing ui
This commit is contained in:
parent
2947d9f48b
commit
59c54d3afd
|
|
@ -30,7 +30,7 @@ vim.o.splitright = true -- force all vertical split
|
||||||
vim.o.swapfile = false -- creates a swapfile
|
vim.o.swapfile = false -- creates a swapfile
|
||||||
vim.o.smartindent = true -- make indenting smarter again
|
vim.o.smartindent = true -- make indenting smarter again
|
||||||
vim.o.showmode = false -- we don't need to see things like -- INSERT -- anymore
|
vim.o.showmode = false -- we don't need to see things like -- INSERT -- anymore
|
||||||
vim.o.showtabline = 2 -- always show tabs
|
vim.o.showtabline = 0 -- always show tabs
|
||||||
vim.o.backspace = 'indent,eol,start' -- allow backspace on
|
vim.o.backspace = 'indent,eol,start' -- allow backspace on
|
||||||
vim.o.pumheight = 10 -- pop up menu height
|
vim.o.pumheight = 10 -- pop up menu height
|
||||||
vim.o.conceallevel = 0 -- so that `` is visible in markdown files
|
vim.o.conceallevel = 0 -- so that `` is visible in markdown files
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,77 @@
|
||||||
|
return{ {
|
||||||
|
"yetone/avante.nvim",
|
||||||
|
-- if you want to build from source then do `make BUILD_FROM_SOURCE=true`
|
||||||
|
-- ⚠️ must add this setting! ! !
|
||||||
|
build = vim.fn.has("win32") ~= 0
|
||||||
|
and "powershell -ExecutionPolicy Bypass -File Build.ps1 -BuildFromSource false"
|
||||||
|
or "make",
|
||||||
|
event = "VeryLazy",
|
||||||
|
version = false, -- Never set this value to "*"! Never!
|
||||||
|
---@module 'avante'
|
||||||
|
---@type avante.Config
|
||||||
|
opts = {
|
||||||
|
-- add any opts here
|
||||||
|
-- this file can contain specific instructions for your project
|
||||||
|
instructions_file = "avante.md",
|
||||||
|
-- for example
|
||||||
|
provider = "claude",
|
||||||
|
providers = {
|
||||||
|
claude = {
|
||||||
|
endpoint = "https://api.anthropic.com",
|
||||||
|
model = "claude-sonnet-4-20250514",
|
||||||
|
timeout = 30000, -- Timeout in milliseconds
|
||||||
|
extra_request_body = {
|
||||||
|
temperature = 0.75,
|
||||||
|
max_tokens = 20480,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
moonshot = {
|
||||||
|
endpoint = "https://api.moonshot.ai/v1",
|
||||||
|
model = "kimi-k2-0711-preview",
|
||||||
|
timeout = 30000, -- Timeout in milliseconds
|
||||||
|
extra_request_body = {
|
||||||
|
temperature = 0.75,
|
||||||
|
max_tokens = 32768,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
dependencies = {
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
"MunifTanjim/nui.nvim",
|
||||||
|
--- The below dependencies are optional,
|
||||||
|
"nvim-mini/mini.pick", -- for file_selector provider mini.pick
|
||||||
|
"nvim-telescope/telescope.nvim", -- for file_selector provider telescope
|
||||||
|
"hrsh7th/nvim-cmp", -- autocompletion for avante commands and mentions
|
||||||
|
"ibhagwan/fzf-lua", -- for file_selector provider fzf
|
||||||
|
"stevearc/dressing.nvim", -- for input provider dressing
|
||||||
|
"folke/snacks.nvim", -- for input provider snacks
|
||||||
|
"nvim-tree/nvim-web-devicons", -- or echasnovski/mini.icons
|
||||||
|
"zbirenbaum/copilot.lua", -- for providers='copilot'
|
||||||
|
{
|
||||||
|
-- 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,
|
||||||
|
},
|
||||||
|
-- required for Windows users
|
||||||
|
use_absolute_path = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
-- Make sure to set this up properly if you have lazy=true
|
||||||
|
'MeanderingProgrammer/render-markdown.nvim',
|
||||||
|
opts = {
|
||||||
|
file_types = { "markdown", "Avante" },
|
||||||
|
},
|
||||||
|
ft = { "markdown", "Avante" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"avifenesh/claucode.nvim",
|
||||||
|
config = function()
|
||||||
|
require("claucode").setup()
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
@ -4,32 +4,23 @@ return {
|
||||||
"stevearc/conform.nvim",
|
"stevearc/conform.nvim",
|
||||||
event = { "BufReadPre", "BufNewFile" },
|
event = { "BufReadPre", "BufNewFile" },
|
||||||
config = function()
|
config = function()
|
||||||
-- Resolve templ binary (Mason first, else PATH)
|
-- Resolve templ binary
|
||||||
local mason_templ = vim.fn.stdpath("data") .. "/mason/bin/templ"
|
local mason_templ = vim.fn.stdpath("data") .. "/mason/bin/templ"
|
||||||
local templ_cmd = (vim.fn.executable(mason_templ) == 1) and mason_templ
|
local templ_cmd = (vim.fn.executable(mason_templ) == 1) and mason_templ
|
||||||
or ((vim.fn.executable("templ") == 1) and "templ" or nil)
|
or ((vim.fn.executable("templ") == 1) and "templ" or nil)
|
||||||
|
|
||||||
if not templ_cmd then
|
|
||||||
vim.notify("[conform.nvim] Could not find `templ` binary. Install via Mason or PATH.", vim.log.levels.WARN)
|
|
||||||
end
|
|
||||||
|
|
||||||
require("conform").setup({
|
require("conform").setup({
|
||||||
formatters = {
|
formatters = {
|
||||||
templ_fmt = {
|
templ_fmt = {
|
||||||
command = templ_cmd or "templ",
|
command = templ_cmd or "templ",
|
||||||
-- Read source from stdin, tell templ the filename for correct rules,
|
|
||||||
-- and write formatted result to stdout (no in-place writes).
|
|
||||||
args = { "fmt", "-stdin-filepath", "$FILENAME", "-stdout" },
|
args = { "fmt", "-stdin-filepath", "$FILENAME", "-stdout" },
|
||||||
stdin = true,
|
stdin = true,
|
||||||
},
|
},
|
||||||
goimports = {
|
-- REMOVED manual goimports definition here.
|
||||||
command = "goimports",
|
-- Conform's built-in one works better.
|
||||||
args = {},
|
|
||||||
stdin = true,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
formatters_by_ft = {
|
formatters_by_ft = {
|
||||||
templ = { "templ_fmt" }, -- ✅ only templ fmt for .templ
|
templ = { "templ_fmt" },
|
||||||
javascript = { "prettier" },
|
javascript = { "prettier" },
|
||||||
typescript = { "prettier" },
|
typescript = { "prettier" },
|
||||||
jsx = { "prettier" },
|
jsx = { "prettier" },
|
||||||
|
|
@ -40,11 +31,18 @@ return {
|
||||||
html = { "prettier" },
|
html = { "prettier" },
|
||||||
css = { "prettier" },
|
css = { "prettier" },
|
||||||
lua = { "stylua" },
|
lua = { "stylua" },
|
||||||
|
-- Use goimports (which handles imports + fmt)
|
||||||
|
-- then gofmt (or gofumpt) as a secondary pass
|
||||||
go = { "goimports", "gofmt" },
|
go = { "goimports", "gofmt" },
|
||||||
},
|
},
|
||||||
format_on_save = function(bufnr)
|
format_on_save = function(bufnr)
|
||||||
if vim.bo[bufnr].filetype == "templ" then
|
local ft = vim.bo[bufnr].filetype
|
||||||
return { timeout_ms = 2000, lsp_fallback = false } -- no LSP/Prettier fallback
|
if ft == "templ" then
|
||||||
|
return { timeout_ms = 2000, lsp_fallback = false }
|
||||||
|
end
|
||||||
|
-- Increase timeout to 3000ms for Go to prevent the "timeout" issue
|
||||||
|
if ft == "go" then
|
||||||
|
return { timeout_ms = 3000, lsp_fallback = true }
|
||||||
end
|
end
|
||||||
return { timeout_ms = 1000, lsp_fallback = true }
|
return { timeout_ms = 1000, lsp_fallback = true }
|
||||||
end,
|
end,
|
||||||
|
|
|
||||||
|
|
@ -41,8 +41,8 @@ return {
|
||||||
vim.keymap.set('n', '<F1>', dap.step_into, { desc = 'Debug: Step Into' })
|
vim.keymap.set('n', '<F1>', dap.step_into, { desc = 'Debug: Step Into' })
|
||||||
vim.keymap.set('n', '<F2>', dap.step_over, { desc = 'Debug: Step Over' })
|
vim.keymap.set('n', '<F2>', dap.step_over, { desc = 'Debug: Step Over' })
|
||||||
vim.keymap.set('n', '<F3>', dap.step_out, { desc = 'Debug: Step Out' })
|
vim.keymap.set('n', '<F3>', dap.step_out, { desc = 'Debug: Step Out' })
|
||||||
vim.keymap.set('n', '<leader>b', dap.toggle_breakpoint, { desc = 'Debug: Toggle Breakpoint' })
|
vim.keymap.set('n', '<leader>db', dap.toggle_breakpoint, { desc = 'Debug: Toggle Breakpoint' })
|
||||||
vim.keymap.set('n', '<leader>B', function()
|
vim.keymap.set('n', '<leader>dB', function()
|
||||||
dap.set_breakpoint(vim.fn.input 'Breakpoint condition: ')
|
dap.set_breakpoint(vim.fn.input 'Breakpoint condition: ')
|
||||||
end, { desc = 'Debug: Set Breakpoint' })
|
end, { desc = 'Debug: Set Breakpoint' })
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -85,11 +85,11 @@ return {
|
||||||
-- Core LSP maps
|
-- Core LSP maps
|
||||||
vim.keymap.set("n", "<leader>cl", "<cmd>LspInfo<CR>", opts("LSP Info"))
|
vim.keymap.set("n", "<leader>cl", "<cmd>LspInfo<CR>", opts("LSP Info"))
|
||||||
|
|
||||||
vim.keymap.set("n", "gd", goto_definition_preferring_source, opts("Go to Definition"))
|
|
||||||
vim.keymap.set("n", "gr", vim.lsp.buf.references, opts("References"))
|
vim.keymap.set("n", "gr", vim.lsp.buf.references, opts("References"))
|
||||||
vim.keymap.set("n", "gI", vim.lsp.buf.implementation, opts("Go to Implementation"))
|
vim.keymap.set("n", "gI", vim.lsp.buf.implementation, opts("Go to Implementation"))
|
||||||
vim.keymap.set("n", "gy", vim.lsp.buf.type_definition, opts("Go to Type Definition"))
|
vim.keymap.set("n", "gy", vim.lsp.buf.type_definition, opts("Go to Type Definition"))
|
||||||
vim.keymap.set("n", "gD", vim.lsp.buf.declaration, opts("Go to Declaration"))
|
vim.keymap.set("n", "gD", vim.lsp.buf.declaration, opts("Go to Declaration"))
|
||||||
|
vim.keymap.set("n", "gd", goto_definition_preferring_source, opts("Go to Definition"))
|
||||||
vim.keymap.set("n", "gK", vim.lsp.buf.signature_help, opts("Signature Help"))
|
vim.keymap.set("n", "gK", vim.lsp.buf.signature_help, opts("Signature Help"))
|
||||||
|
|
||||||
vim.keymap.set("i", "<C-k>", vim.lsp.buf.signature_help, opts("Signature Help"))
|
vim.keymap.set("i", "<C-k>", vim.lsp.buf.signature_help, opts("Signature Help"))
|
||||||
|
|
|
||||||
|
|
@ -64,9 +64,10 @@ return {
|
||||||
"-dist","-build","-out","-coverage","-tmp","-.cache",
|
"-dist","-build","-out","-coverage","-tmp","-.cache",
|
||||||
},
|
},
|
||||||
semanticTokens = true,
|
semanticTokens = true,
|
||||||
memoryMode = "DegradeClosed",
|
-- memoryMode = "DegradeClosed",
|
||||||
symbolMatcher = "FastFuzzy",
|
symbolMatcher = "FastFuzzy",
|
||||||
["ui.completion.experimentalPostfixCompletions"] = false,
|
["ui.completion.experimentalPostfixCompletions"] = false,
|
||||||
|
vulncheck = "Imports",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ return {
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Import color theme based on environment variable NVIM_THEME
|
-- Import color theme based on environment variable NVIM_THEME
|
||||||
local env_var_nvim_theme = os.getenv 'NVIM_THEME' or 'nord'
|
local env_var_nvim_theme = os.getenv 'NVIM_THEME' or 'wombat'
|
||||||
|
|
||||||
-- Define a table of themes
|
-- Define a table of themes
|
||||||
local themes = {
|
local themes = {
|
||||||
|
|
@ -95,8 +95,8 @@ return {
|
||||||
},
|
},
|
||||||
sections = {
|
sections = {
|
||||||
lualine_a = { mode },
|
lualine_a = { mode },
|
||||||
lualine_b = { 'branch' },
|
lualine_c = { },
|
||||||
lualine_c = { filename },
|
lualine_b = { filename },
|
||||||
lualine_x = { diagnostics, diff, { 'encoding', cond = hide_in_width }, { 'filetype', cond = hide_in_width } },
|
lualine_x = { diagnostics, diff, { 'encoding', cond = hide_in_width }, { 'filetype', cond = hide_in_width } },
|
||||||
lualine_y = { 'location' },
|
lualine_y = { 'location' },
|
||||||
lualine_z = { 'progress' },
|
lualine_z = { 'progress' },
|
||||||
|
|
|
||||||
|
|
@ -4,9 +4,6 @@ return {
|
||||||
branch = '0.1.x',
|
branch = '0.1.x',
|
||||||
dependencies = {
|
dependencies = {
|
||||||
'nvim-lua/plenary.nvim',
|
'nvim-lua/plenary.nvim',
|
||||||
-- Fuzzy Finder Algorithm which requires local dependencies to be built.
|
|
||||||
-- Only load if `make` is available. Make sure you have the system
|
|
||||||
-- requirements installed.
|
|
||||||
{
|
{
|
||||||
'nvim-telescope/telescope-fzf-native.nvim',
|
'nvim-telescope/telescope-fzf-native.nvim',
|
||||||
build = 'make',
|
build = 'make',
|
||||||
|
|
@ -15,30 +12,27 @@ return {
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
'nvim-telescope/telescope-ui-select.nvim',
|
'nvim-telescope/telescope-ui-select.nvim',
|
||||||
|
|
||||||
-- Useful for getting pretty icons, but requires a Nerd Font.
|
|
||||||
'nvim-tree/nvim-web-devicons',
|
'nvim-tree/nvim-web-devicons',
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
local telescope = require 'telescope'
|
local telescope = require 'telescope'
|
||||||
local actions = require 'telescope.actions'
|
local actions = require 'telescope.actions'
|
||||||
local builtin = require 'telescope.builtin'
|
local builtin = require 'telescope.builtin'
|
||||||
|
local themes = require 'telescope.themes'
|
||||||
|
|
||||||
require('telescope').setup {
|
telescope.setup {
|
||||||
defaults = {
|
defaults = {
|
||||||
winblend = 0,
|
winblend = 0,
|
||||||
mappings = {
|
mappings = {
|
||||||
i = {
|
i = {
|
||||||
['<C-k>'] = actions.move_selection_previous, -- move to prev result
|
['<C-k>'] = actions.move_selection_previous,
|
||||||
['<C-j>'] = actions.move_selection_next, -- move to next result
|
['<C-j>'] = actions.move_selection_next,
|
||||||
['<C-l>'] = actions.select_default, -- open file
|
['<C-l>'] = actions.select_default,
|
||||||
-- Enable paste from system clipboard
|
|
||||||
['<C-r>'] = actions.paste_register,
|
['<C-r>'] = actions.paste_register,
|
||||||
},
|
},
|
||||||
n = {
|
n = {
|
||||||
['q'] = actions.close,
|
['q'] = actions.close,
|
||||||
},
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
pickers = {
|
pickers = {
|
||||||
|
|
@ -46,18 +40,65 @@ return {
|
||||||
file_ignore_patterns = { 'node_modules', '.git', '.venv', 'query.sql.go', '*_templ.go' },
|
file_ignore_patterns = { 'node_modules', '.git', '.venv', 'query.sql.go', '*_templ.go' },
|
||||||
hidden = true,
|
hidden = true,
|
||||||
},
|
},
|
||||||
buffers = {
|
|
||||||
|
-- Replace your current buffers picker block with this
|
||||||
|
buffers = themes.get_dropdown {
|
||||||
initial_mode = 'normal',
|
initial_mode = 'normal',
|
||||||
sort_lastused = true,
|
sort_lastused = true,
|
||||||
-- sort_mru = true,
|
previewer = false,
|
||||||
|
layout_config = { width = 0.8, height = 0.5 },
|
||||||
|
entry_maker = function(entry)
|
||||||
|
local devicons = require('nvim-web-devicons')
|
||||||
|
local entry_display = require('telescope.pickers.entry_display')
|
||||||
|
|
||||||
|
local displayer = entry_display.create {
|
||||||
|
separator = " ",
|
||||||
|
items = {
|
||||||
|
{ width = 2 }, -- Icon
|
||||||
|
{ width = 45 }, -- Path
|
||||||
|
{ width = 3 }, -- Modified [+]
|
||||||
|
{ width = 6 }, -- Errors
|
||||||
|
{ width = 6 }, -- Warnings
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
local raw_path = entry.filename or entry.path or (entry.info and entry.info.name) or "unknown"
|
||||||
|
local relative_path = vim.fn.fnamemodify(raw_path, ":.")
|
||||||
|
local display_name = vim.fn.fnamemodify(raw_path, ":t")
|
||||||
|
local icon, icon_col = devicons.get_icon(display_name, string.match(display_name, "%.([^.]+)$"), { default = true })
|
||||||
|
|
||||||
|
-- Logic for Diagnostics
|
||||||
|
local errors = 0
|
||||||
|
local warnings = 0
|
||||||
|
if vim.api.nvim_buf_is_valid(entry.bufnr) then
|
||||||
|
errors = #vim.diagnostic.get(entry.bufnr, { severity = vim.diagnostic.severity.ERROR })
|
||||||
|
warnings = #vim.diagnostic.get(entry.bufnr, { severity = vim.diagnostic.severity.WARN })
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Check if buffer is modified
|
||||||
|
local modified = vim.api.nvim_get_option_value('modified', { buf = entry.bufnr }) and "[+]" or ""
|
||||||
|
|
||||||
|
return {
|
||||||
|
value = entry,
|
||||||
|
ordinal = relative_path,
|
||||||
|
filename = raw_path,
|
||||||
|
bufnr = entry.bufnr,
|
||||||
|
display = function(ent)
|
||||||
|
return displayer {
|
||||||
|
{ icon, icon_col },
|
||||||
|
{ relative_path, "TelescopeResultsComment" },
|
||||||
|
{ modified, "String" }, -- Greenish color for modified
|
||||||
|
{ errors > 0 and (" " .. errors) or "", "DiagnosticError" },
|
||||||
|
{ warnings > 0 and (" " .. warnings) or "", "DiagnosticWarn" },
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
end,
|
||||||
mappings = {
|
mappings = {
|
||||||
n = {
|
i = { ["<C-d>"] = actions.delete_buffer },
|
||||||
['d'] = actions.delete_buffer,
|
n = { ["d"] = actions.delete_buffer, ["l"] = actions.select_default },
|
||||||
['l'] = actions.select_default,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
|
}, },
|
||||||
live_grep = {
|
live_grep = {
|
||||||
file_ignore_patterns = { 'node_modules', '.git', '.venv' },
|
file_ignore_patterns = { 'node_modules', '.git', '.venv' },
|
||||||
additional_args = function(_)
|
additional_args = function(_)
|
||||||
|
|
@ -71,7 +112,7 @@ return {
|
||||||
},
|
},
|
||||||
extensions = {
|
extensions = {
|
||||||
['ui-select'] = {
|
['ui-select'] = {
|
||||||
require('telescope.themes').get_dropdown(),
|
themes.get_dropdown(),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
git_files = {
|
git_files = {
|
||||||
|
|
@ -79,41 +120,58 @@ return {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Enable telescope fzf native, if installed
|
-- Enable extensions
|
||||||
pcall(require('telescope').load_extension, 'fzf')
|
pcall(telescope.load_extension, 'fzf')
|
||||||
pcall(require('telescope').load_extension, 'ui-select')
|
pcall(telescope.load_extension, 'ui-select')
|
||||||
|
|
||||||
|
-- KEYMAPS
|
||||||
|
-- The requested buffer modal
|
||||||
|
vim.keymap.set('n', '<leader>b', builtin.buffers, { desc = '[B]uffers (Modal)' })
|
||||||
|
|
||||||
|
-- Your existing mappings
|
||||||
vim.keymap.set('n', '<leader>?', builtin.oldfiles, { desc = '[?] Find recently opened files' })
|
vim.keymap.set('n', '<leader>?', builtin.oldfiles, { desc = '[?] Find recently opened files' })
|
||||||
vim.keymap.set('n', '<leader>sb', builtin.buffers, { desc = '[S]earch existing [B]uffers' })
|
vim.keymap.set('n', '<leader>sb', builtin.buffers, { desc = '[S]earch existing [B]uffers' })
|
||||||
vim.keymap.set('n', '<leader>sm', builtin.marks, { desc = '[S]earch [M]arks' })
|
vim.keymap.set('n', '<leader>sm', builtin.marks, { desc = '[S]earch [M]arks' })
|
||||||
vim.keymap.set('n', '<leader>gf', builtin.git_files, { desc = 'Search [G]it [F]iles' })
|
-- vim.keymap.set('n', '<leader>gf', builtin.git_files, { desc = 'Search [G]it [F]iles' })
|
||||||
vim.keymap.set('n', '<leader>gc', builtin.git_commits, { desc = 'Search [G]it [C]ommits' })
|
-- vim.keymap.set('n', '<leader>gc', builtin.git_commits, { desc = 'Search [G]it [C]ommits' })
|
||||||
vim.keymap.set('n', '<leader>gcf', builtin.git_bcommits, { desc = 'Search [G]it [C]ommits for current [F]ile' })
|
-- vim.keymap.set('n', '<leader>gcf', builtin.git_bcommits, { desc = 'Search [G]it [C]ommits for current [F]ile' })
|
||||||
vim.keymap.set('n', '<leader>gb', builtin.git_branches, { desc = 'Search [G]it [B]ranches' })
|
-- vim.keymap.set('n', '<leader>gb', builtin.git_branches, { desc = 'Search [G]it [B]ranches' })
|
||||||
vim.keymap.set('n', '<leader>gs', builtin.git_status, { desc = 'Search [G]it [S]tatus (diff view)' })
|
-- vim.keymap.set('n', '<leader>gs', builtin.git_status, { desc = 'Search [G]it [S]tatus (diff view)' })
|
||||||
vim.keymap.set('n', '<leader>sf', builtin.find_files, { desc = '[S]earch [F]iles' })
|
vim.keymap.set('n', '<leader>sf', builtin.find_files, { desc = '[S]earch [F]iles' })
|
||||||
vim.keymap.set('n', '<leader>sh', builtin.help_tags, { desc = '[S]earch [H]elp' })
|
vim.keymap.set('n', '<leader>sh', builtin.help_tags, { desc = '[S]earch [H]elp' })
|
||||||
vim.keymap.set('n', '<leader>sw', builtin.grep_string, { desc = '[S]earch current [W]ord' })
|
vim.keymap.set('n', '<leader>sw', builtin.grep_string, { desc = '[S]earch current [W]ord' })
|
||||||
vim.keymap.set('n', '<leader>sg', builtin.live_grep, { desc = '[S]earch by [G]rep' })
|
vim.keymap.set('n', '<leader>sg', builtin.live_grep, { desc = '[S]earch by [G]rep' })
|
||||||
vim.keymap.set('n', '<leader>sd', builtin.diagnostics, { desc = '[S]earch [D]iagnostics' })
|
-- vim.keymap.set('n', '<leader>sd', builtin.diagnostics, { desc = '[S]earch [D]iagnostics' })
|
||||||
vim.keymap.set('n', '<leader>sr', builtin.resume, { desc = '[S]earch [R]resume' })
|
vim.keymap.set('n', '<leader>sr', builtin.resume, { desc = '[S]earch [R]resume' })
|
||||||
vim.keymap.set('n', '<leader>s.', builtin.oldfiles, { desc = '[S]earch Recent Files ("." for repeat)' })
|
vim.keymap.set('n', '<leader>s.', builtin.oldfiles, { desc = '[S]earch Recent Files ("." for repeat)' })
|
||||||
vim.keymap.set('n', '<leader><leader>', require('telescope.builtin').find_files, { desc = '[ ] Search Files' })
|
vim.keymap.set('n', '<leader><leader>', builtin.find_files, { desc = '[ ] Search Files' })
|
||||||
|
-- Keymap to show errors across the entire project/open buffers
|
||||||
|
|
||||||
|
|
||||||
|
vim.keymap.set('n', '<leader>se', function()
|
||||||
|
require('telescope.builtin').diagnostics(require('telescope.themes').get_dropdown({
|
||||||
|
bufnr = nil, -- nil shows diagnostics for ALL buffers
|
||||||
|
severity = "ERROR", -- Only show Errors (ignores warnings/hints)
|
||||||
|
root_dir= true,
|
||||||
|
layout_config = { width = 0.8, height = 0.6 },
|
||||||
|
}))
|
||||||
|
end, { desc = '[S]earch [E]rrors' })
|
||||||
|
|
||||||
vim.keymap.set('n', '<leader>sds', function()
|
vim.keymap.set('n', '<leader>sds', function()
|
||||||
builtin.lsp_document_symbols {
|
builtin.lsp_document_symbols {
|
||||||
symbols = { 'Class', 'Function', 'Method', 'Constructor', 'Interface', 'Module', 'Property' },
|
symbols = { 'Class', 'Function', 'Method', 'Constructor', 'Interface', 'Module', 'Property' },
|
||||||
}
|
}
|
||||||
end, { desc = '[S]each LSP document [S]ymbols' })
|
end, { desc = '[S]each LSP document [S]ymbols' })
|
||||||
-- vim.keymap.set('n', '<leader><leader>', builtin.buffers, { desc = '[ ] Find existing buffers' })
|
|
||||||
vim.keymap.set('n', '<leader>s/', function()
|
vim.keymap.set('n', '<leader>s/', function()
|
||||||
builtin.live_grep {
|
builtin.live_grep {
|
||||||
grep_open_files = true,
|
grep_open_files = true,
|
||||||
prompt_title = 'Live Grep in Open Files',
|
prompt_title = 'Live Grep in Open Files',
|
||||||
}
|
}
|
||||||
end, { desc = '[S]earch [/] in Open Files' })
|
end, { desc = '[S]earch [/] in Open Files' })
|
||||||
|
|
||||||
vim.keymap.set('n', '<leader>/', function()
|
vim.keymap.set('n', '<leader>/', function()
|
||||||
-- You can pass additional configuration to telescope to change theme, layout, etc.
|
builtin.current_buffer_fuzzy_find(themes.get_dropdown {
|
||||||
builtin.current_buffer_fuzzy_find(require('telescope.themes').get_dropdown {
|
|
||||||
previewer = false,
|
previewer = false,
|
||||||
})
|
})
|
||||||
end, { desc = '[/] Fuzzily search in current buffer' })
|
end, { desc = '[/] Fuzzily search in current buffer' })
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
-- Windsurf for LazyVim - Fixed syntax errors
|
||||||
|
return {
|
||||||
|
-- Windsurf plugin
|
||||||
|
{
|
||||||
|
"Exafunction/windsurf.nvim",
|
||||||
|
event = "InsertEnter",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
"hrsh7th/nvim-cmp",
|
||||||
|
},
|
||||||
|
keys = {
|
||||||
|
{ "<leader>ct", "<cmd>Codeium Toggle<cr>", desc = "Toggle Codeium" },
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
require("codeium").setup({})
|
||||||
|
|
||||||
|
-- Add codeium to nvim-cmp sources after everything loads
|
||||||
|
vim.schedule(function()
|
||||||
|
local cmp = require('cmp')
|
||||||
|
local config = cmp.get_config()
|
||||||
|
table.insert(config.sources, 1, { name = "codeium" })
|
||||||
|
cmp.setup(config)
|
||||||
|
end)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue