feat: revamp core configuration for improved customizability

This commit is contained in:
Prad N committed 2025-03-28 15:33:06 -04:00
1 parent cee08ee5ec
commit 087a24541f
17 files changed
+604 -129

No files matched your search

+15 -3
View File
@@ -8,13 +8,19 @@ return {
{ import = "astrocommunity.bars-and-lines.bufferline-nvim" },
{ import = "astrocommunity.code-runner.overseer-nvim" },
{ import = "astrocommunity.colorscheme.cyberdream-nvim" },
{ import = "astrocommunity.completion.blink-cmp" },
{ import = "astrocommunity.completion.supermaven-nvim" },
{ import = "astrocommunity.completion.avante-nvim" },
{ import = "astrocommunity.completion.blink-cmp" },
{ import = "astrocommunity.completion.copilot-lua-cmp" },
{ import = "astrocommunity.completion.nvim-cmp" },
{ import = "astrocommunity.editing-support.conform-nvim" },
{ import = "astrocommunity.debugging.persistent-breakpoints-nvim" },
{ import = "astrocommunity.icon.mini-icons" },
{ import = "astrocommunity.keybinding.mini-clue" },
{ import = "astrocommunity.lsp.inc-rename-nvim" },
{ import = "astrocommunity.lsp.lsp-inlayhints-nvim" },
{ import = "astrocommunity.lsp.lsp-lens-nvim" },
{ import = "astrocommunity.lsp.nvim-lsp-file-operations" },
{ import = "astrocommunity.lsp.nvim-lint" },
{ import = "astrocommunity.markdown-and-latex.markview-nvim" },
{ import = "astrocommunity.motion.flash-nvim" },
{ import = "astrocommunity.motion.leap-nvim" },
{ import = "astrocommunity.motion.mini-basics" },
@@ -25,10 +31,14 @@ return {
{ import = "astrocommunity.pack.go" },
{ import = "astrocommunity.pack.markdown" },
{ import = "astrocommunity.pack.mdx" },
{ import = "astrocommunity.pack.pkl" },
{ import = "astrocommunity.pack.templ" },
{ import = "astrocommunity.pack.tailwindcss" },
{ import = "astrocommunity.pack.typescript" },
{ import = "astrocommunity.pack.yaml" },
{ import = "astrocommunity.quickfix.quicker-nvim" },
{ import = "astrocommunity.recipes.picker-nvchad-theme" },
{ import = "astrocommunity.recipes.picker-lsp-mappings" },
{ import = "astrocommunity.utility.telescope-lazy-nvim" },
{ import = "astrocommunity.utility.telescope-fzy-native-nvim" },
{ import = "astrocommunity.utility.mason-tool-installer-nvim" },
@@ -39,4 +49,6 @@ return {
{ import = "astrocommunity.recipes.heirline-vscode-winbar" },
{ import = "astrocommunity.recipes.picker-lsp-mappings" },
{ import = "astrocommunity.recipes.telescope-lsp-mappings" },
-- import/override with your plugins folder
}
+2 -1
View File
@@ -1,6 +1,7 @@
require("lazy").setup({
{
"AstroNvim/AstroNvim",
version = "^5", -- Remove version tracking to elect for nightly AstroNvim
import = "astronvim.plugins",
opts = { -- AstroNvim options must be set here with the `import` key
mapleader = " ", -- This ensures the leader key must be configured before Lazy is set up
@@ -14,7 +15,7 @@ require("lazy").setup({
{ import = "plugins" },
} --[[@as LazySpec]], {
-- Configure any other `lazy.nvim` configuration options here
install = { colorscheme = { "cyberdream" } },
install = { colorscheme = { "astrotheme", "habamax" } },
ui = { backdrop = 100 },
performance = {
rtp = {
+40
View File
@@ -0,0 +1,40 @@
return {
"GeorgesAlkhouri/nvim-aider",
cmd = {
"AiderTerminalToggle",
"AiderHealth",
},
keys = {
{ "<leader>a/", "<cmd>AiderTerminalToggle<cr>", desc = "Open Aider" },
{ "<leader>as", "<cmd>AiderTerminalSend<cr>", desc = "Send to Aider", mode = { "n", "v" } },
{ "<leader>ac", "<cmd>AiderQuickSendCommand<cr>", desc = "Send Command To Aider" },
{ "<leader>ab", "<cmd>AiderQuickSendBuffer<cr>", desc = "Send Buffer To Aider" },
{ "<leader>a+", "<cmd>AiderQuickAddFile<cr>", desc = "Add File to Aider" },
{ "<leader>a-", "<cmd>AiderQuickDropFile<cr>", desc = "Drop File from Aider" },
{ "<leader>ar", "<cmd>AiderQuickReadOnlyFile<cr>", desc = "Add File as Read-Only" },
-- Example nvim-tree.lua integration if needed
{ "<leader>a+", "<cmd>AiderTreeAddFile<cr>", desc = "Add File from Tree to Aider", ft = "NvimTree" },
{ "<leader>a-", "<cmd>AiderTreeDropFile<cr>", desc = "Drop File from Tree from Aider", ft = "NvimTree" },
},
dependencies = {
"folke/snacks.nvim",
--- The below dependencies are optional
"catppuccin/nvim",
"nvim-tree/nvim-tree.lua",
--- Neo-tree integration
{
"nvim-neo-tree/neo-tree.nvim",
opts = function(_, opts)
-- Example mapping configuration (already set by default)
opts.window = {
mappings = {
["+"] = { "nvim_aider_add", desc = "add to aider" },
["-"] = { "nvim_aider_drop", desc = "drop from aider" },
},
}
require("nvim_aider.neo_tree").setup(opts)
end,
},
},
config = true,
}
+23 -8
View File
@@ -1,9 +1,3 @@
-- AstroCore provides a central place to modify mappings, vim options, autocommands, and more!
-- Configuration documentation can be found with `:h astrocore`
-- NOTE: We highly recommend setting up the Lua Language Server (`:LspInstall lua_ls`)
-- as this provides autocomplete and documentation while editing
---@type LazySpec
return {
"AstroNvim/astrocore",
---@type AstroCoreOpts
@@ -18,11 +12,17 @@ return {
{ ".git", "_darcs", ".hg", ".bzr", ".svn" }, -- next check for a version controlled parent directory
{
"lua",
"Taskfile.yml",
"devbox.json",
"Cargo.toml",
"go.work",
"Pipfile",
"Makefile",
"requirements.txt",
"README.md",
"devbox.json",
"package.json",
"go.mod",
}, -- lastly check for a file named `main`
},
-- ignore things from root detection
@@ -78,7 +78,6 @@ return {
["vv"] = { "gg0VG$", desc = "Select all contents in buffer" },
["<C-Space>"] = { "<Cmd>Telescope oldfiles<CR>", desc = "Recent Files" },
["<C-m>"] = { "<Cmd>OverseerRun<CR>", desc = "Overseer" },
["<C-d>"] = { "<Cmd>Telescope diagnostics<CR>", desc = "Show Errors" },
["<C-u>"] = { "<Cmd>Telescope lsp_document_symbols<CR>", desc = "Show Symbols" },
["<C-c>"] = { function() vim.cmd "bd" end, desc = "Close window" },
["<C-q>"] = { "<Cmd>wa<CR><Cmd>qa!<CR>", desc = "Save and Quit Neovim" },
@@ -89,8 +88,24 @@ return {
v = {
["<C-e>"] = { "<Cmd>Neotree toggle<CR>", desc = "Show Explorer" },
},
t = {
["<Esc>"] = { [[<C-\><C-n>]], desc = "Exit terminal mode" },
["<Esc>"] = {
function()
-- Check if we're in an Aider terminal buffer
local current_buf = vim.api.nvim_get_current_buf()
local buf_name = vim.api.nvim_buf_get_name(current_buf)
-- If the buffer name contains "Aider" (as seen in the screenshot)
if buf_name:match "Aider" then
vim.cmd "AiderTerminalToggle"
else
-- Default behavior: exit terminal mode
vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes([[<C-\><C-n>]], true, false, true), "n", false)
end
end,
desc = "Exit terminal mode or toggle Aider terminal",
},
},
},
},
+97 -3
View File
@@ -1,15 +1,109 @@
-- AstroLSP allows you to customize the features in AstroNvim's LSP configuration engine
-- Configuration documentation can be found with `:h astrolsp`
-- NOTE: We highly recommend setting up the Lua Language Server (`:LspInstall lua_ls`)
-- as this provides autocomplete and documentation while editing
---@type LazySpec
return {
"AstroNvim/astrolsp",
---@type AstroLSPOpts
opts = {
-- Configuration table of features provided by AstroLSP
features = {
codelens = true, -- enable/disable codelens refresh on start
inlay_hints = false, -- enable/disable inlay hints on start
semantic_tokens = true, -- enable/disable semantic token highlighting
signature_help = true, -- enable/disable signature help on start
},
-- customize lsp formatting options
formatting = {
-- control auto formatting on save
format_on_save = {
enabled = true, -- enable or disable
enabled = true, -- enable or disable format on save globally
allow_filetypes = { -- enable format on save for specified filetypes only
"go",
"templ",
"md",
"json",
"pkl",
"yaml",
},
ignore_filetypes = { -- disable format on save for specified filetypes
"markdown",
"python",
-- "python",
},
},
disabled = { -- disable formatting capabilities for the listed language servers
-- disable lua_ls formatting capability if you want to use StyLua to format your lua code
-- "lua_ls",
},
timeout_ms = 1000, -- default format timeout
-- filter = function(client) -- fully override the default formatting function
-- return true
-- end
},
-- enable servers that you already have installed without mason
servers = {
-- "pyright"
},
-- customize language server configuration options passed to `lspconfig`
---@diagnostic disable: missing-fields
config = {
-- clangd = { capabilities = { offsetEncoding = "utf-8" } },
},
-- customize how language servers are attached
handlers = {
-- a function without a key is simply the default handler, functions take two parameters, the server name and the configured options table for that server
-- function(server, opts) require("lspconfig")[server].setup(opts) end
-- the key is the server that is being setup with `lspconfig`
-- rust_analyzer = false, -- setting a handler to false will disable the set up of that language server
-- pyright = function(_, opts) require("lspconfig").pyright.setup(opts) end -- or a custom handler function can be passed
},
-- Configure buffer local auto commands to add when attaching a language server
autocmds = {
-- first key is the `augroup` to add the auto commands to (:h augroup)
lsp_codelens_refresh = {
-- Optional condition to create/delete auto command group
-- can either be a string of a client capability or a function of `fun(client, bufnr): boolean`
-- condition will be resolved for each client on each execution and if it ever fails for all clients,
-- the auto commands will be deleted for that buffer
cond = "textDocument/codeLens",
-- cond = function(client, bufnr) return client.name == "lua_ls" end,
-- list of auto commands to set
{
-- events to trigger
event = { "InsertLeave", "BufEnter" },
-- the rest of the autocmd options (:h nvim_create_autocmd)
desc = "Refresh codelens (buffer)",
callback = function(args)
if require("astrolsp").config.features.codelens then vim.lsp.codelens.refresh { bufnr = args.buf } end
end,
},
},
},
-- mappings to be set up on attaching of a language server
mappings = {
n = {
-- a `cond` key can provided as the string of a server capability to be required to attach, or a function with `client` and `bufnr` parameters from the `on_attach` that returns a boolean
gD = {
function() vim.lsp.buf.declaration() end,
desc = "Declaration of current symbol",
cond = "textDocument/declaration",
},
["<Leader>uY"] = {
function() require("astrolsp.toggles").buffer_semantic_tokens() end,
desc = "Toggle LSP semantic highlight (buffer)",
cond = function(client)
return client.supports_method "textDocument/semanticTokens/full" and vim.lsp.semantic_tokens ~= nil
end,
},
},
},
-- A custom `on_attach` function to be run after the default `on_attach` function
-- takes two parameters `client` and `bufnr` (`:h lspconfig-setup`)
on_attach = function(client, bufnr)
-- this would disable semanticTokensProvider for all clients
-- client.server_capabilities.semanticTokensProvider = nil
end,
},
}
+28
View File
@@ -1,3 +1,8 @@
-- AstroUI provides the basis for configuring the AstroNvim User Interface
-- Configuration documentation can be found with `:h astroui`
-- NOTE: We highly recommend setting up the Lua Language Server (`:LspInstall lua_ls`)
-- as this provides autocomplete and documentation while editing
---@type LazySpec
return {
"AstroNvim/astroui",
@@ -5,5 +10,28 @@ return {
opts = {
-- change colorscheme
colorscheme = "cyberdream",
-- AstroUI allows you to easily modify highlight groups easily for any and all colorschemes
highlights = {
init = { -- this table overrides highlights in all themes
-- Normal = { bg = "#000000" },
},
astrodark = { -- a table of overrides/changes when applying the astrotheme theme
-- Normal = { bg = "#000000" },
},
},
-- Icons can be configured throughout the interface
icons = {
-- configure the loading of the lsp in the status line
LSPLoading1 = "⠋",
LSPLoading2 = "⠙",
LSPLoading3 = "⠹",
LSPLoading4 = "⠸",
LSPLoading5 = "⠼",
LSPLoading6 = "⠴",
LSPLoading7 = "⠦",
LSPLoading8 = "⠧",
LSPLoading9 = "⠇",
LSPLoading10 = "⠏",
},
},
}
+28
View File
@@ -0,0 +1,28 @@
if true then return {} end -- WARN: REMOVE THIS LINE TO ACTIVATE THIS FILE
-- Customize Mason
---@type LazySpec
return {
-- use mason-tool-installer for automatically installing Mason packages
{
"WhoIsSethDaniel/mason-tool-installer.nvim",
-- overrides `require("mason-tool-installer").setup(...)`
opts = {
-- Make sure to use the names found in `:Mason`
ensure_installed = {
-- install language servers
"lua-language-server",
-- install formatters
"stylua",
-- install debuggers
"debugpy",
-- install any other package
"tree-sitter-cli",
},
},
},
}
+11 -13
View File
@@ -6,11 +6,11 @@ return {
enable_git_status = true,
enable_diagnostics = true,
sort_case_insensitive = false,
auto_expand_width = true,
auto_expand_width = false,
git_status_async = true, -- Asynchronous git status. Improves performance.
hide_root_node = true, -- Hide the root node.
retain_hidden_root_indent = true, -- IF the root node is hidden, keep the indentation anyhow.
use_libuv_file_watcher = true,
-- Add custom title function to show host/org/repo
window = {
position = "left",
@@ -86,7 +86,7 @@ return {
file_size = {
enabled = true,
width = 12, -- width of the column
required_width = 64, -- min width of window required to show this column
required_width = 48, -- min width of window required to show this column
},
type = {
enabled = true,
@@ -131,20 +131,18 @@ return {
},
bind_to_cwd = true,
follow_current_file = {
enabled = false,
enabled = true,
leave_dirs_open = true,
},
filtered_items = {
force_visible_in_empty_folder = true,
group_empty = true,
show_hidden_count = false,
hide_dotfiles = false,
hide_dotfiles = true,
hide_gitignored = true,
hide_by_pattern = {
".cz.toml",
"dist",
".python-version",
"*_test.go",
"*.pb.go",
"*_templ.go",
"buf.gen.*",
@@ -158,23 +156,22 @@ return {
hide_by_name = {
".github",
"settings.json",
".taskfiles",
".gitignore",
"analysis_options.yaml",
"decorators",
"slumber.yml",
"CHANGELOG.md",
"devbox.d",
"matrix",
"env",
"package-lock.json",
".husky",
"translations",
"LICENSE.md",
"node_modules",
".tmuxinator.yml",
".envrc",
".taskfile.dist.yml",
},
never_show_by_pattern = {
"node_modules",
"PULL_REQUEST_TEMPLATE.md",
".DocumentRevisions-V100",
".Spotlight-V100",
@@ -205,7 +202,9 @@ return {
"*.ico",
"build",
"PklProject.deps.json",
".aider.tags.cache.v4",
"*.iml",
"Icon?",
},
never_show = {
".dart_tool",
@@ -234,7 +233,7 @@ return {
},
},
diagnostics = {
enable = true,
enable = false,
icons = {
hint = "",
info = "",
@@ -251,7 +250,6 @@ return {
-- Main sources
sources = {
"filesystem",
"diagnostics",
},
},
},
+24
View File
@@ -0,0 +1,24 @@
if true then return {} end -- WARN: REMOVE THIS LINE TO ACTIVATE THIS FILE
-- Customize None-ls sources
---@type LazySpec
return {
"nvimtools/none-ls.nvim",
opts = function(_, opts)
-- opts variable is the default configuration table for the setup function call
-- local null_ls = require "null-ls"
-- Check supported formatters and linters
-- https://github.com/nvimtools/none-ls.nvim/tree/main/lua/null-ls/builtins/formatting
-- https://github.com/nvimtools/none-ls.nvim/tree/main/lua/null-ls/builtins/diagnostics
-- Only insert new sources, do not replace the existing ones
-- (If you wish to replace, use `opts.sources = {}` instead of the `list_insert_unique` function)
opts.sources = require("astrocore").list_insert_unique(opts.sources, {
-- Set a formatter
-- null_ls.builtins.formatting.stylua,
-- null_ls.builtins.formatting.prettier,
})
end,
}
+64
View File
@@ -0,0 +1,64 @@
-- function for calculating the current session name
local get_session_name = function()
local name = vim.fn.getcwd()
local branch = vim.fn.system "git branch --show-current"
if vim.v.shell_error == 0 then
return name .. vim.trim(branch --[[@as string]])
else
return name
end
end
return {
"AstroNvim/astrocore",
---@type AstroCoreOpts
opts = {
sessions = {
-- disable the auto-saving of directory sessions
autosave = { cwd = false },
},
mappings = {
n = {
-- update save dirsession mapping to get the correct session name
["<Leader>SS"] = {
function() require("resession").save(get_session_name(), { dir = "dirsession" }) end,
desc = "Save this dirsession",
},
-- update load dirsession mapping to get the correct session name
["<Leader>S."] = {
function() require("resession").load(get_session_name(), { dir = "dirsession" }) end,
desc = "Load current dirsession",
},
},
},
autocmds = {
-- disable alpha autostart
alpha_autostart = false,
git_branch_sessions = {
-- auto save directory sessions on leaving
{
event = "VimLeavePre",
desc = "Save git branch directory sessions on close",
callback = vim.schedule_wrap(function()
if require("astrocore.buffer").is_valid_session() then
require("resession").save(get_session_name(), { dir = "dirsession", notify = false })
end
end),
},
-- auto restore previous previous directory session, remove if necessary
{
event = "VimEnter",
desc = "Restore previous directory session if neovim opened with no arguments",
nested = true, -- trigger other autocommands as buffers open
callback = function()
-- Only load the session if nvim was started with no args
if vim.fn.argc(-1) == 0 then
-- try to load a directory session using the current working directory
require("resession").load(get_session_name(), { dir = "dirsession", silence_errors = true })
end
end,
},
},
},
},
}
+17
View File
@@ -0,0 +1,17 @@
return {
"AstroNvim/astrolsp",
---@param opts AstroLSPOpts
opts = function(_, opts)
if opts.mappings.n.gd then opts.mappings.n.gd[1] = function() require("snacks.picker").lsp_definitions() end end
if opts.mappings.n.gI then opts.mappings.n.gI[1] = function() require("snacks.picker").lsp_implementations() end end
if opts.mappings.n.gy then
opts.mappings.n.gy[1] = function() require("snacks.picker").lsp_type_definitions() end
end
if opts.mappings.n["<Leader>lG"] then
opts.mappings.n["<Leader>lG"][1] = function() require("snacks.picker").lsp_workspace_symbols() end
end
if opts.mappings.n["<Leader>lR"] then
opts.mappings.n["<Leader>lR"][1] = function() require("snacks.picker").lsp_references() end
end
end,
}
+15
View File
@@ -0,0 +1,15 @@
if true then return {} end -- WARN: REMOVE THIS LINE TO ACTIVATE THIS FILE
-- Customize Treesitter
---@type LazySpec
return {
"nvim-treesitter/nvim-treesitter",
opts = {
ensure_installed = {
"lua",
"vim",
-- add more arguments for adding more treesitter parsers
},
},
}
+93 -24
View File
@@ -1,9 +1,20 @@
-- You can also add or configure plugins by creating files in this `plugins/` folder
-- PLEASE REMOVE THE EXAMPLES YOU HAVE NO INTEREST IN BEFORE ENABLING THIS FILE
-- Here are some examples:
---@type LazySpec
return {
-- == Examples of Adding Plugins ==
"andweeb/presence.nvim",
{
"ray-x/lsp_signature.nvim",
event = "BufRead",
config = function() require("lsp_signature").setup() end,
},
-- == Examples of Overriding Plugins ==
{
"kdheepak/lazygit.nvim",
lazy = true,
@@ -24,7 +35,25 @@ return {
{ "<C-g>", "<cmd>LazyGit<cr>", desc = "LazyGit" },
},
},
{
"brianhuster/live-preview.nvim",
dependencies = {
-- You can choose one of the following pickers
"nvim-telescope/telescope.nvim",
"ibhagwan/fzf-lua",
"echasnovski/mini.pick",
},
},
{
"toppair/peek.nvim",
event = { "VeryLazy" },
build = "deno task --quiet build:fast",
config = function()
require("peek").setup()
vim.api.nvim_create_user_command("PeekOpen", require("peek").open, {})
vim.api.nvim_create_user_command("PeekClose", require("peek").close, {})
end,
},
{
"chrisgrieser/nvim-rip-substitute",
cmd = "RipSubstitute",
@@ -37,33 +66,73 @@ return {
},
},
},
-- disable neo-tree
-- customize dashboard options
{
"goolord/alpha-nvim",
enabled = true,
opts = function(_, opts)
-- customize the dashboard header
opts.section.header.val = {
" ▗▄████▄▖ ",
" ▟███▛███▛▘ ",
" ▄███▜▝ ▘▀ ▗ ",
" ▗▟██▜▞▘ ▟██▖ ",
" ▟██▛█▘ ▄▙▖ ▝▜█▜█▙ ",
"▟██▜▀ ▄████▄ ▀██▟▙",
"██▟▌ ▐████▟█▜ ▐▟██",
"▜▛██▄ ▀▜▟█▛▀ ▄██▛▛",
" ▜█▛█▙▖ ▝▀▌▘ ▗▟█▟▙▛ ",
" ▝▜█▛▘ ▟██▟█▘ ",
" ▘ ▄▄ ▄███▟▀ ",
" ▗▟▜▛██▜█▜▞▘ ",
" ▝▀████▀▘ ",
}
return opts
"folke/snacks.nvim",
opts = {
dashboard = {
preset = {
header = table.concat({
" ▗▄████▄▖ ",
" ▟███▛███▛▘ ",
" ▄███▜▝ ▘▀ ▗ ",
" ▗▟██▜▞▘ ▟██▖ ",
" ▟██▛█▘ ▄▙▖ ▝▜█▜█▙ ",
"▟██▜▀ ▄████▄ ▀██▟▙",
"██▟▌ ▐████▟█▜ ▐▟██",
"▜▛██▄ ▀▜▟█▛▀ ▄██▛▛",
" ▜█▛█▙▖ ▝▀▌▘ ▗▟█▟▙▛ ",
" ▝▜█▛▘ ▟██▟█▘ ",
" ▘ ▄▄ ▄███▟▀ ",
" ▗▟▜▛██▜█▜▞▘ ",
" ▝▀████▀▘ ",
}, "\n"),
},
},
},
},
-- You can disable default plugins as follows:
{ "max397574/better-escape.nvim", enabled = false },
-- You can also easily customize additional setup of plugins that is outside of the plugin's setup call
{
"L3MON4D3/LuaSnip",
config = function(plugin, opts)
require "astronvim.plugins.configs.luasnip"(plugin, opts) -- include the default astronvim config that calls the setup call
-- add more custom luasnip configuration such as filetype extend or custom snippets
local luasnip = require "luasnip"
luasnip.filetype_extend("javascript", { "javascriptreact" })
end,
},
-- Add SchemaStore.nvim to your plugin
{
"b0o/SchemaStore.nvim",
"windwp/nvim-autopairs",
config = function(plugin, opts)
require "astronvim.plugins.configs.nvim-autopairs"(plugin, opts) -- include the default astronvim config that calls the setup call
-- add more custom autopairs configuration such as custom rules
local npairs = require "nvim-autopairs"
local Rule = require "nvim-autopairs.rule"
local cond = require "nvim-autopairs.conds"
npairs.add_rules(
{
Rule("$", "$", { "tex", "latex" })
-- don't add a pair if the next character is %
:with_pair(cond.not_after_regex "%%")
-- don't add a pair if the previous character is xxx
:with_pair(
cond.not_before_regex("xxx", 3)
)
-- don't move right when repeat character
:with_move(cond.none())
-- don't delete if the next character is xx
:with_del(cond.not_after_regex "xx")
-- disable adding a newline when you press <cr>
:with_cr(cond.none()),
},
-- disable for .vim files, but it work for another filetypes
Rule("a", "a", "-vim")
)
end,
},
}
+65 -2
View File
@@ -1,7 +1,7 @@
-- This will run last in the setup process and is a good place to configure
-- things like custom filetypes. This just pure lua so anything that doesn't
-- fit in the normal config locations above can go here
-- Map <C-/> to toggle Aider terminal in all modes
require("telescope").setup {
pickers = {
oldfiles = {
@@ -17,8 +17,71 @@ require("overseer").setup {
size = vim.o.columns * 0.25,
auto_scroll = true,
close_on_exit = false,
quit_on_exit = "never",
quit_on_exit = "success",
open_on_start = true,
hidden = true,
},
}
require("nvim_aider").setup {
-- Command that executes Aider
aider_cmd = "aider",
-- Command line arguments passed to aider
args = {
"--no-auto-commits",
"--pretty",
"--stream",
"--dark-mode", -- Enable dark mode in Aider
},
-- Theme colors (dark mode palette)
theme = {
-- Dark mode-friendly colors
user_input_color = "#a6da95", -- Soft green for user input
tool_output_color = "#8aadf4", -- Soft blue for tool output
tool_error_color = "#ed8796", -- Soft red for errors
tool_warning_color = "#eed49f", -- Soft yellow for warnings
assistant_output_color = "#c6a0f6", -- Soft purple for assistant output
completion_menu_color = "#a5adcb", -- Slightly dimmer text for completion menu
completion_menu_bg_color = "#1e1e2e", -- Darker background for completion menu
completion_menu_current_color = "#89dceb", -- Cyan for selected item
completion_menu_current_bg_color = "#313244", -- Slightly lighter than bg for selection
},
-- snacks.picker.layout.Config configuration
picker_cfg = {
preset = "vscode",
-- Add dark mode settings for picker
theme = "dark",
},
-- Other snacks.terminal.Opts options
config = {
os = { editPreset = "nvim-remote" },
gui = {
nerdFontsVersion = "3",
theme = "dark", -- Ensure terminal uses dark theme
},
term = {
-- Terminal settings for better dark mode appearance
defaultBg = "#1e1e2e", -- Dark background
defaultFg = "#cdd6f4", -- Light text color
},
},
win = {
wo = {
winbar = "Aider",
winhighlight = "Normal:NormalFloat,FloatBorder:FloatBorder", -- Ensure proper highlighting
},
position = "right",
width = 0.33, -- This will make the terminal take up 1/3 of the total window width
-- Additional window settings for dark mode
border = "rounded", -- Rounded borders look nice in dark mode
style = "minimal", -- Minimal UI style
},
-- Additional dark mode settings
appearance = {
dark_mode = true, -- Explicitly set dark mode
},
}
-- This will run last in the setup process and is a good place to configure
-- things like custom filetypes. This is just pure lua so anything that doesn't
-- fit in the normal config locations above can go here