added more capabilities to my nvim setup
This commit is contained in:
@@ -106,3 +106,11 @@ autocmd("FileType", {
|
|||||||
vim.opt_local.spell = true
|
vim.opt_local.spell = true
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
autocmd("DirChanged", {
|
||||||
|
callback = function()
|
||||||
|
if vim.fn.filereadable(".devcontainer/devcontainer.json") == 1 then
|
||||||
|
vim.notify("Devcontainer detected", vim.log.levels.INFO)
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|||||||
@@ -68,3 +68,37 @@ map("n", "<leader>at", "<cmd>AvanteToggle<cr>", { desc = "AI Toggle" })
|
|||||||
-- Database keymaps
|
-- Database keymaps
|
||||||
map("n", "<leader>db", "<cmd>DBUIToggle<cr>", { desc = "Toggle DB UI" })
|
map("n", "<leader>db", "<cmd>DBUIToggle<cr>", { desc = "Toggle DB UI" })
|
||||||
map("n", "<leader>da", "<cmd>DBUIAddConnection<cr>", { desc = "Add DB Connection" })
|
map("n", "<leader>da", "<cmd>DBUIAddConnection<cr>", { desc = "Add DB Connection" })
|
||||||
|
|
||||||
|
-- Neotest
|
||||||
|
local neotest = require("neotest")
|
||||||
|
|
||||||
|
map("n", "<leader>tt", neotest.run.run, { desc = "Run nearest test" })
|
||||||
|
map("n", "<leader>tf", function()
|
||||||
|
neotest.run.run(vim.fn.expand("%"))
|
||||||
|
end, { desc = "Run test file" })
|
||||||
|
|
||||||
|
map("n", "<leader>ts", neotest.summary.toggle)
|
||||||
|
map("n", "<leader>to", neotest.output.open)
|
||||||
|
map("n", "<leader>tc", "<cmd>Coverage<cr>", { desc = "Show coverage" })
|
||||||
|
|
||||||
|
-- Go benchmark
|
||||||
|
map("n", "<leader>gb", function()
|
||||||
|
vim.cmd("!go test -bench . ./...")
|
||||||
|
end, { desc = "Go benchmarks" })
|
||||||
|
map("n", "<leader>gp", function()
|
||||||
|
vim.cmd("!go test -cpuprofile cpu.out && go tool pprof cpu.out")
|
||||||
|
end, { desc = "Go CPU profile" })
|
||||||
|
|
||||||
|
-- Overseer
|
||||||
|
map("n", "<leader>or", "<cmd>OverseerRun<cr>", { desc = "Run task" })
|
||||||
|
map("n", "<leader>ot", "<cmd>OverseerToogle<cr>", { desc = "Task list" })
|
||||||
|
|
||||||
|
-- Aerial
|
||||||
|
map("n", "<leader>so", "<cmd>AerialToggle<cr>", { desc = "Symbols outline" })
|
||||||
|
map("n", "<leader>sh", vim.lsp.buf.incoming_calls, { desc = "Incoming calls" })
|
||||||
|
map("n", "<leader>sc", vim.lsp.buf.outgoing_calls, { desc = "Outgoing calls" })
|
||||||
|
|
||||||
|
-- Diagnostics
|
||||||
|
map("n", "<leader>xx", "<cmd>Trouble diagnostics toggle<cr>")
|
||||||
|
map("n", "<leader>xw", "<cmd>Trouble workspace_diagnostics<cr>")
|
||||||
|
map("n", "<leader>xt", "<cmd>Trouble todo<cr>")
|
||||||
|
|||||||
@@ -3,35 +3,40 @@
|
|||||||
|
|
||||||
local opt = vim.opt
|
local opt = vim.opt
|
||||||
|
|
||||||
|
if vim.env.SSH_CONNECTION then
|
||||||
|
opt.clipboard = ""
|
||||||
|
opt.timeoutlen = 1000
|
||||||
|
end
|
||||||
|
|
||||||
-- General
|
-- General
|
||||||
opt.clipboard = "unnamedplus" -- Sync with system clipboard
|
opt.clipboard = "unnamedplus" -- Sync with system clipboard
|
||||||
opt.confirm = true -- Confirm before closing unsaved buffer
|
opt.confirm = true -- Confirm before closing unsaved buffer
|
||||||
opt.cursorline = true -- Highlight current line
|
opt.cursorline = true -- Highlight current line
|
||||||
opt.mouse = "a" -- Enable mouse
|
opt.mouse = "a" -- Enable mouse
|
||||||
opt.number = true -- Show line numbers
|
opt.number = true -- Show line numbers
|
||||||
opt.relativenumber = true -- Relative line numbers
|
opt.relativenumber = true -- Relative line numbers
|
||||||
opt.signcolumn = "yes" -- Always show sign column
|
opt.signcolumn = "yes" -- Always show sign column
|
||||||
opt.termguicolors = true -- True color support
|
opt.termguicolors = true -- True color support
|
||||||
opt.wrap = false -- Disable line wrap
|
opt.wrap = true -- Disable line wrap
|
||||||
|
|
||||||
-- Indentation
|
-- Indentation
|
||||||
opt.expandtab = true -- Use spaces instead of tabs
|
opt.expandtab = true -- Use spaces instead of tabs
|
||||||
opt.shiftwidth = 2 -- Size of indent
|
opt.shiftwidth = 2 -- Size of indent
|
||||||
opt.tabstop = 2 -- Number of spaces tabs count for
|
opt.tabstop = 2 -- Number of spaces tabs count for
|
||||||
opt.smartindent = true -- Smart indentation
|
opt.smartindent = true -- Smart indentation
|
||||||
|
|
||||||
-- Search
|
-- Search
|
||||||
opt.ignorecase = true -- Ignore case
|
opt.ignorecase = true -- Ignore case
|
||||||
opt.smartcase = true -- Don't ignore case with capitals
|
opt.smartcase = true -- Don't ignore case with capitals
|
||||||
opt.hlsearch = true -- Highlight search results
|
opt.hlsearch = true -- Highlight search results
|
||||||
opt.incsearch = true -- Show search results as you type
|
opt.incsearch = true -- Show search results as you type
|
||||||
|
|
||||||
-- Split behavior
|
-- Split behavior
|
||||||
opt.splitbelow = true -- Put new windows below current
|
opt.splitbelow = true -- Put new windows below current
|
||||||
opt.splitright = true -- Put new windows right of current
|
opt.splitright = true -- Put new windows right of current
|
||||||
|
|
||||||
-- Undo
|
-- Undo
|
||||||
opt.undofile = true -- Persistent undo
|
opt.undofile = true -- Persistent undo
|
||||||
opt.undolevels = 10000 -- Maximum undo levels
|
opt.undolevels = 10000 -- Maximum undo levels
|
||||||
|
|
||||||
-- Performance
|
-- Performance
|
||||||
@@ -45,3 +50,16 @@ opt.completeopt = "menu,menuone,noselect"
|
|||||||
opt.foldmethod = "expr"
|
opt.foldmethod = "expr"
|
||||||
opt.foldexpr = "nvim_treesitter#foldexpr()"
|
opt.foldexpr = "nvim_treesitter#foldexpr()"
|
||||||
opt.foldlevel = 99 -- Start with all folds open
|
opt.foldlevel = 99 -- Start with all folds open
|
||||||
|
|
||||||
|
opt.exrc = true
|
||||||
|
opt.secure = true
|
||||||
|
|
||||||
|
vim.diagnostic.config({
|
||||||
|
virtual_text = {
|
||||||
|
prefix = "●",
|
||||||
|
},
|
||||||
|
severity_sort = true,
|
||||||
|
float = {
|
||||||
|
border = "rounded",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|||||||
8
lua/overseer/template/user/go.lua
Normal file
8
lua/overseer/template/user/go.lua
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
return {
|
||||||
|
name = "go test",
|
||||||
|
builder = function()
|
||||||
|
return {
|
||||||
|
cmd = { "go", "test", "./..." },
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
}
|
||||||
@@ -44,7 +44,7 @@ return {
|
|||||||
opts = {
|
opts = {
|
||||||
-- Default provider (switch with :AvanteProvider command)
|
-- Default provider (switch with :AvanteProvider command)
|
||||||
-- Options: "claude", "openai", "azure", "gemini", "copilot", "cohere"
|
-- Options: "claude", "openai", "azure", "gemini", "copilot", "cohere"
|
||||||
provider = "claude",
|
provider = "openai",
|
||||||
|
|
||||||
-- Provider configurations
|
-- Provider configurations
|
||||||
providers = {
|
providers = {
|
||||||
@@ -59,7 +59,7 @@ return {
|
|||||||
},
|
},
|
||||||
openai = {
|
openai = {
|
||||||
endpoint = "https://api.openai.com/v1",
|
endpoint = "https://api.openai.com/v1",
|
||||||
model = "gpt-4o",
|
model = "gpt-4o-mini",
|
||||||
timeout = 30000,
|
timeout = 30000,
|
||||||
extra_request_body = {
|
extra_request_body = {
|
||||||
temperature = 0.75,
|
temperature = 0.75,
|
||||||
@@ -193,4 +193,21 @@ return {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"zbirenbaum/copilot.lua",
|
||||||
|
cmd = "Copilot",
|
||||||
|
event = "InsertEnter",
|
||||||
|
opts = {
|
||||||
|
suggestion = {
|
||||||
|
enabled = true,
|
||||||
|
auto_trigger = true,
|
||||||
|
keymap = {
|
||||||
|
accept = "<C-l>",
|
||||||
|
next = "<C-n>",
|
||||||
|
prev = "<C-p>",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
panel = { enabled = false },
|
||||||
|
},
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,24 +63,24 @@ return {
|
|||||||
keys = {
|
keys = {
|
||||||
-- Debug keymaps
|
-- Debug keymaps
|
||||||
{ "<leader>dB", function() require("dap").set_breakpoint(vim.fn.input("Breakpoint condition: ")) end, desc = "Breakpoint Condition" },
|
{ "<leader>dB", function() require("dap").set_breakpoint(vim.fn.input("Breakpoint condition: ")) end, desc = "Breakpoint Condition" },
|
||||||
{ "<leader>db", function() require("dap").toggle_breakpoint() end, desc = "Toggle Breakpoint" },
|
{ "<leader>db", function() require("dap").toggle_breakpoint() end, desc = "Toggle Breakpoint" },
|
||||||
{ "<leader>dc", function() require("dap").continue() end, desc = "Continue" },
|
{ "<leader>dc", function() require("dap").continue() end, desc = "Continue" },
|
||||||
{ "<leader>dC", function() require("dap").run_to_cursor() end, desc = "Run to Cursor" },
|
{ "<leader>dC", function() require("dap").run_to_cursor() end, desc = "Run to Cursor" },
|
||||||
{ "<leader>dg", function() require("dap").goto_() end, desc = "Go to Line (No Execute)" },
|
{ "<leader>dg", function() require("dap").goto_() end, desc = "Go to Line (No Execute)" },
|
||||||
{ "<leader>di", function() require("dap").step_into() end, desc = "Step Into" },
|
{ "<leader>di", function() require("dap").step_into() end, desc = "Step Into" },
|
||||||
{ "<leader>dj", function() require("dap").down() end, desc = "Down" },
|
{ "<leader>dj", function() require("dap").down() end, desc = "Down" },
|
||||||
{ "<leader>dk", function() require("dap").up() end, desc = "Up" },
|
{ "<leader>dk", function() require("dap").up() end, desc = "Up" },
|
||||||
{ "<leader>dl", function() require("dap").run_last() end, desc = "Run Last" },
|
{ "<leader>dl", function() require("dap").run_last() end, desc = "Run Last" },
|
||||||
{ "<leader>do", function() require("dap").step_out() end, desc = "Step Out" },
|
{ "<leader>do", function() require("dap").step_out() end, desc = "Step Out" },
|
||||||
{ "<leader>dO", function() require("dap").step_over() end, desc = "Step Over" },
|
{ "<leader>dO", function() require("dap").step_over() end, desc = "Step Over" },
|
||||||
{ "<leader>dp", function() require("dap").pause() end, desc = "Pause" },
|
{ "<leader>dp", function() require("dap").pause() end, desc = "Pause" },
|
||||||
{ "<leader>dr", function() require("dap").repl.toggle() end, desc = "Toggle REPL" },
|
{ "<leader>dr", function() require("dap").repl.toggle() end, desc = "Toggle REPL" },
|
||||||
{ "<leader>ds", function() require("dap").session() end, desc = "Session" },
|
{ "<leader>ds", function() require("dap").session() end, desc = "Session" },
|
||||||
{ "<leader>dt", function() require("dap").terminate() end, desc = "Terminate" },
|
{ "<leader>dt", function() require("dap").terminate() end, desc = "Terminate" },
|
||||||
{ "<leader>dw", function() require("dap.ui.widgets").hover() end, desc = "Widgets" },
|
{ "<leader>dw", function() require("dap.ui.widgets").hover() end, desc = "Widgets" },
|
||||||
-- Go-specific
|
-- Go-specific
|
||||||
{ "<leader>dT", function() require("dap-go").debug_test() end, desc = "Debug Go Test" },
|
{ "<leader>dT", function() require("dap-go").debug_test() end, desc = "Debug Go Test" },
|
||||||
{ "<leader>dL", function() require("dap-go").debug_last_test() end, desc = "Debug Last Go Test" },
|
{ "<leader>dL", function() require("dap-go").debug_last_test() end, desc = "Debug Last Go Test" },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -93,23 +93,23 @@ return {
|
|||||||
},
|
},
|
||||||
keys = {
|
keys = {
|
||||||
{ "<leader>du", function() require("dapui").toggle({}) end, desc = "Dap UI" },
|
{ "<leader>du", function() require("dapui").toggle({}) end, desc = "Dap UI" },
|
||||||
{ "<leader>de", function() require("dapui").eval() end, desc = "Eval", mode = { "n", "v" } },
|
{ "<leader>de", function() require("dapui").eval() end, desc = "Eval", mode = { "n", "v" } },
|
||||||
},
|
},
|
||||||
opts = {
|
opts = {
|
||||||
layouts = {
|
layouts = {
|
||||||
{
|
{
|
||||||
elements = {
|
elements = {
|
||||||
{ id = "scopes", size = 0.25 },
|
{ id = "scopes", size = 0.25 },
|
||||||
{ id = "breakpoints", size = 0.25 },
|
{ id = "breakpoints", size = 0.25 },
|
||||||
{ id = "stacks", size = 0.25 },
|
{ id = "stacks", size = 0.25 },
|
||||||
{ id = "watches", size = 0.25 },
|
{ id = "watches", size = 0.25 },
|
||||||
},
|
},
|
||||||
position = "left",
|
position = "left",
|
||||||
size = 40,
|
size = 40,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
elements = {
|
elements = {
|
||||||
{ id = "repl", size = 0.5 },
|
{ id = "repl", size = 0.5 },
|
||||||
{ id = "console", size = 0.5 },
|
{ id = "console", size = 0.5 },
|
||||||
},
|
},
|
||||||
position = "bottom",
|
position = "bottom",
|
||||||
@@ -135,7 +135,16 @@ return {
|
|||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"jay-babu/mason-nvim-dap.nvim",
|
||||||
|
opts = {
|
||||||
|
ensure_installed = {
|
||||||
|
"go",
|
||||||
|
"python",
|
||||||
|
"node2",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
-- Virtual text for debugging
|
-- Virtual text for debugging
|
||||||
{
|
{
|
||||||
"theHamsta/nvim-dap-virtual-text",
|
"theHamsta/nvim-dap-virtual-text",
|
||||||
|
|||||||
8
lua/plugins/dashboard.lua
Normal file
8
lua/plugins/dashboard.lua
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"folke/trouble.nvim",
|
||||||
|
opts = {
|
||||||
|
use_diagnostic_signs = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
10
lua/plugins/devcontainer.lua
Normal file
10
lua/plugins/devcontainer.lua
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"jamestthompson3/nvim-remote-containers",
|
||||||
|
cmd = {
|
||||||
|
"AttachToContainer",
|
||||||
|
"BuildImage",
|
||||||
|
"StartImage",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -2,6 +2,27 @@
|
|||||||
-- Custom keybindings for file explorer (snacks.nvim built into LazyVim)
|
-- Custom keybindings for file explorer (snacks.nvim built into LazyVim)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
{
|
||||||
|
"nvim-telescope/telescope.nvim",
|
||||||
|
opts = {
|
||||||
|
defaults = {
|
||||||
|
hidden = true,
|
||||||
|
file_ignore_patterns = {},
|
||||||
|
},
|
||||||
|
pickers = {
|
||||||
|
find_files = {
|
||||||
|
hidden = true,
|
||||||
|
no_ignore = true,
|
||||||
|
no_ignore_parent = true,
|
||||||
|
},
|
||||||
|
live_grep = {
|
||||||
|
additional_args = function()
|
||||||
|
return { "--hidden", "--no-ignore" }
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
-- Configure snacks.nvim explorer (already included in LazyVim)
|
-- Configure snacks.nvim explorer (already included in LazyVim)
|
||||||
{
|
{
|
||||||
"folke/snacks.nvim",
|
"folke/snacks.nvim",
|
||||||
@@ -39,12 +60,12 @@ return {
|
|||||||
},
|
},
|
||||||
keys = {
|
keys = {
|
||||||
-- Ctrl+Shift+e - Toggle explorer
|
-- Ctrl+Shift+e - Toggle explorer
|
||||||
{ "<C-S-e>", function() Snacks.explorer() end, desc = "Toggle Explorer" },
|
{ "<C-S-e>", function() Snacks.explorer() end, desc = "Toggle Explorer" },
|
||||||
-- Alternative binding if terminal doesn't handle Ctrl+Shift
|
-- Alternative binding if terminal doesn't handle Ctrl+Shift
|
||||||
{ "<leader>fe", function() Snacks.explorer() end, desc = "File Explorer" },
|
{ "<leader>fe", function() Snacks.explorer() end, desc = "File Explorer" },
|
||||||
-- Lazygit
|
-- Lazygit
|
||||||
{ "<leader>gg", function() Snacks.lazygit() end, desc = "Lazygit" },
|
{ "<leader>gg", function() Snacks.lazygit() end, desc = "Lazygit" },
|
||||||
{ "<leader>gl", function() Snacks.lazygit.log() end, desc = "Lazygit Log" },
|
{ "<leader>gl", function() Snacks.lazygit.log() end, desc = "Lazygit Log" },
|
||||||
{ "<leader>gf", function() Snacks.lazygit.log_file() end, desc = "Lazygit File History" },
|
{ "<leader>gf", function() Snacks.lazygit.log_file() end, desc = "Lazygit File History" },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
7
lua/plugins/go-coverage.lua
Normal file
7
lua/plugins/go-coverage.lua
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"andythigpen/nvim-coverage",
|
||||||
|
dependencies = "nvim-lua/plenary.nvim",
|
||||||
|
config = true,
|
||||||
|
},
|
||||||
|
}
|
||||||
10
lua/plugins/go-profiling.lua
Normal file
10
lua/plugins/go-profiling.lua
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"davecheney/profile",
|
||||||
|
ft = "go",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"rbong/vim-flog",
|
||||||
|
cmd = { "Flog" },
|
||||||
|
},
|
||||||
|
}
|
||||||
40
lua/plugins/lsp-roots.lua
Normal file
40
lua/plugins/lsp-roots.lua
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"neovim/nvim-lspconfig",
|
||||||
|
opts = {
|
||||||
|
servers = {
|
||||||
|
tsserver = {
|
||||||
|
root_dir = function(fname)
|
||||||
|
return require("lspconfig.util").root_pattern(
|
||||||
|
"pnpm-workspace.yaml",
|
||||||
|
"nx.json",
|
||||||
|
"turbo.json",
|
||||||
|
"package.json",
|
||||||
|
".git"
|
||||||
|
)(fname)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
gopls = {
|
||||||
|
root_dir = function(fname)
|
||||||
|
return require("lspconfig.util").root_pattern(
|
||||||
|
"go.work",
|
||||||
|
"go.mod",
|
||||||
|
".git"
|
||||||
|
)(fname)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
pyright = {
|
||||||
|
root_dir = function(fname)
|
||||||
|
return require("lspconfig.util").root_pattern(
|
||||||
|
"pyproject.toml",
|
||||||
|
"setup.py",
|
||||||
|
".git"
|
||||||
|
)(fname)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
6
lua/plugins/neotest-python.lua
Normal file
6
lua/plugins/neotest-python.lua
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"nvim-neotest/neotest-python",
|
||||||
|
dependencies = { "nvim-neotest/neotest" },
|
||||||
|
},
|
||||||
|
}
|
||||||
19
lua/plugins/neotest.lua
Normal file
19
lua/plugins/neotest.lua
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"nvim-neotest/neotest",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-neotest/nvim-nio",
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
"antoinemadec/FixCursorHold.nvim",
|
||||||
|
"nvim-neotest/neotest-go",
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
adapters = {
|
||||||
|
require("neotest-go"),
|
||||||
|
require("neotest-python")({
|
||||||
|
dap = { justMyCode = false },
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
8
lua/plugins/overseer.lua
Normal file
8
lua/plugins/overseer.lua
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"stevearc/overseer.nvim",
|
||||||
|
opts = {
|
||||||
|
templates = { "builtin", "user.go", "user.npm" }
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
15
lua/plugins/performance.lua
Normal file
15
lua/plugins/performance.lua
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
opts = {
|
||||||
|
highlight = {
|
||||||
|
enable = true,
|
||||||
|
disable = function(_, buf)
|
||||||
|
local max_filesize = 200 * 1024 -- 200 KB
|
||||||
|
local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf))
|
||||||
|
return ok and stats and stats.size > max_filesize
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
10
lua/plugins/symbols.lua
Normal file
10
lua/plugins/symbols.lua
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"stevearc/aerial.nvim",
|
||||||
|
opts = {
|
||||||
|
layout = {
|
||||||
|
max_width = 40,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
20
lua/plugins/theme.lua
Normal file
20
lua/plugins/theme.lua
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"catppuccin/nvim",
|
||||||
|
name = "catppuccin",
|
||||||
|
priority = 1000,
|
||||||
|
opts = {
|
||||||
|
integrations = {
|
||||||
|
treesitter = true,
|
||||||
|
cmp = true,
|
||||||
|
gitsigns = true,
|
||||||
|
neotest = true,
|
||||||
|
dap = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
config = function(_, opts)
|
||||||
|
require("catppuccin").setup(opts)
|
||||||
|
vim.cmd.colorscheme("catppuccin-mocha")
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user