feat: enhance Neovim configuration and add community plugins

This commit is contained in:
Prad N committed 2025-03-22 00:37:38 -04:00
1 parent 2cd17abf76
commit e1c47171e4
10 files changed
+180 -143

No files matched your search

+25 -7
View File
@@ -5,20 +5,38 @@
---@type LazySpec
return {
"AstroNvim/astrocommunity",
{ 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.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.motion.flash-nvim" },
{ import = "astrocommunity.motion.leap-nvim" },
{ import = "astrocommunity.motion.mini-basics" },
{ import = "astrocommunity.motion.nvim-surround" },
{ import = "astrocommunity.motion.portal-nvim" },
{ import = "astrocommunity.pack.docker" },
{ import = "astrocommunity.pack.lua" },
{ import = "astrocommunity.pack.go" },
{ import = "astrocommunity.pack.markdown" },
{ import = "astrocommunity.pack.mdx" },
{ import = "astrocommunity.pack.templ" },
{ import = "astrocommunity.pack.tailwindcss" },
{ import = "astrocommunity.pack.typescript" },
{ import = "astrocommunity.pack.yaml" },
{ import = "astrocommunity.code-runner.overseer-nvim" },
{ import = "astrocommunity.lsp.inc-rename-nvim" },
{ import = "astrocommunity.lsp.nvim-lsp-file-operations" },
{ import = "astrocommunity.bars-and-lines.bufferline-nvim" },
{ import = "astrocommunity.colorscheme.cyberdream-nvim" },
{ import = "astrocommunity.utility.telescope-lazy-nvim" },
{ import = "astrocommunity.completion.supermaven-nvim" },
{ import = "astrocommunity.completion.blink-cmp" },
{ import = "astrocommunity.utility.telescope-fzy-native-nvim" },
{ import = "astrocommunity.utility.mason-tool-installer-nvim" },
{ import = "astrocommunity.utility.noice-nvim" },
{ import = "astrocommunity.recipes.ai" },
{ import = "astrocommunity.recipes.astrolsp-auto-signature-help" },
{ import = "astrocommunity.recipes.heirline-nvchad-statusline" },
{ import = "astrocommunity.recipes.heirline-vscode-winbar" },
{ import = "astrocommunity.recipes.picker-lsp-mappings" },
{ import = "astrocommunity.recipes.telescope-lsp-mappings" },
}
+9 -2
View File
@@ -16,7 +16,14 @@ return {
detector = {
"lsp", -- highest priority is getting workspace from running language servers
{ ".git", "_darcs", ".hg", ".bzr", ".svn" }, -- next check for a version controlled parent directory
{ "lua", "go.mod", "package.json", "Cargo.toml", "go.work", "Pipfile", "Makefile", "requirements.txt" }, -- lastly check for a file named `main`
{
"lua",
"Cargo.toml",
"go.work",
"Pipfile",
"Makefile",
"requirements.txt",
}, -- lastly check for a file named `main`
},
-- ignore things from root detection
ignore = {
@@ -26,7 +33,7 @@ return {
-- automatically update working directory (update manually with `:AstroRoot`)
autochdir = true,
-- scope of working directory to change ("global"|"tab"|"win")
scope = "tab",
scope = "tab", -- Changed from "win" to "global" to make directory changes apply globally
-- show notification on every working directory change
notify = false,
},
+15
View File
@@ -0,0 +1,15 @@
return {
"AstroNvim/astrolsp",
---@type AstroLSPOpts
opts = {
formatting = {
format_on_save = {
enabled = true, -- enable or disable
ignore_filetypes = { -- disable format on save for specified filetypes
"markdown",
"python",
},
},
},
},
}
+66 -54
View File
@@ -9,13 +9,48 @@ return {
auto_expand_width = true,
git_status_async = true, -- Asynchronous git status. Improves performance.
hide_root_node = true, -- Hide the root node.
retain_hidden_root_indent = false, -- IF the root node is hidden, keep the indentation anyhow.
retain_hidden_root_indent = true, -- IF the root node is hidden, keep the indentation anyhow.
-- Add custom title function to show host/org/repo
window = {
position = "left",
width = 40,
title = function()
-- Get current working directory
local cwd = vim.fn.getcwd()
-- Extract host/org/repo from path (assuming ghq structure)
-- This pattern looks for Code/host.com/org/repo in the path
local pattern = ".*/Code/([^/]+/[^/]+/[^/]+)"
local match = string.match(cwd, pattern)
if match then
return match
else
return "SonrVim"
end
end,
mappings = {
["<bs>"] = "navigate_up",
[">"] = "set_root",
["."] = "toggle_hidden",
["/"] = "fuzzy_finder",
["f"] = "filter_on_submit",
["<c-x>"] = "clear_filter",
["<CR>"] = "open_and_close_neotree",
["<S-CR>"] = "open",
},
header = {
highlight = "NeoTreeHeader",
},
},
default_component_configs = {
container = {
enable_character_fade = true,
},
indent = {
indent_size = 1,
indent_size = 2,
padding = 1, -- extra padding on left hand side
-- indent guides
with_markers = true,
@@ -23,8 +58,8 @@ return {
last_indent_marker = "└",
highlight = "NeoTreeIndentMarker",
-- expander config, needed for nesting files
expander_collapsed = "",
expander_expanded = "",
expander_collapsed = "",
expander_expanded = "",
expander_highlight = "NeoTreeExpander",
},
name = {
@@ -36,15 +71,15 @@ return {
symbols = {
-- Change type
added = "", -- or "✚", but this is redundant info if you use git_status_colors on the name
modified = "", -- or "", but this is redundant info if you use git_status_colors on the name
modified = "", -- or "", but this is redundant info if you use git_status_colors on the name
deleted = "✖", -- this can only be used in the git_status source
renamed = "󰁕", -- this can only be used in the git_status source
-- Status type
untracked = "",
ignored = "",
untracked = "",
ignored = "",
unstaged = "󰄱",
staged = "",
conflict = "",
staged = "",
conflict = "",
},
},
-- If you don't want to use these columns, you can set `enabled = false` for each of them individually
@@ -72,25 +107,11 @@ return {
enabled = false,
},
},
-- Simplified default component configs
window = {
mappings = {
["<bs>"] = "navigate_up",
[">"] = "set_root",
["."] = "toggle_hidden",
["/"] = "fuzzy_finder",
["f"] = "filter_on_submit",
["<c-x>"] = "clear_filter",
["<CR>"] = "open_and_close_neotree",
["<S-CR>"] = "open",
},
header = {
highlight = "NeoTreeHeader",
},
},
buffers = {
follow_current_file = true,
follow_current_file = {
enabled = true,
},
},
-- Filesystem specific settings
@@ -110,7 +131,7 @@ return {
},
bind_to_cwd = true,
follow_current_file = {
enabled = true,
enabled = false,
leave_dirs_open = true,
},
filtered_items = {
@@ -120,23 +141,24 @@ return {
hide_dotfiles = false,
hide_gitignored = true,
hide_by_pattern = {
".cz.toml",
"dist",
".python-version",
"*_test.go",
"*.pb.go",
"*_templ.go",
"buf.gen.*",
"mprocs.*",
"*config.*.js",
"*config.js",
"deps.mjs",
"test_*.go",
".trunk",
".config",
},
hide_by_name = {
".github",
"settings.json",
".taskfiles",
"types",
".gitignore",
"analysis_options.yaml",
"decorators",
@@ -146,14 +168,19 @@ return {
"package-lock.json",
".husky",
"translations",
"test",
"networks",
"go.mod",
"LICENSE.md",
"CONTRIBUTING.md",
"node_modules",
".tmuxinator.yml",
".envrc",
".taskfile.dist.yml",
},
never_show_by_pattern = {
"PULL_REQUEST_TEMPLATE.md",
".DocumentRevisions-V100",
".Spotlight-V100",
".TemporaryItems",
".Trashes",
".fseventsd",
".trunk",
".editorconfig",
".eslint*",
@@ -185,18 +212,6 @@ return {
".idea",
".metadata",
".venv",
"zkp",
"ted25519",
"dkg",
"ecies",
"ot",
"paillier",
"sharing",
"signatures",
"subtle",
"bulletproof",
"dkg",
"daed",
".gradle",
"gradle.bat",
".aider.chat.history.md",
@@ -205,29 +220,26 @@ return {
".devcontainer",
"heighliner",
".tmp",
".zed",
".vscode",
"go.work.sum",
".DS_Store",
".git",
"LICENSE",
"interchaintest",
".envrc",
"tmp",
"sonr.log",
"DISCUSSION_TEMPLATE",
"ISSUE_TEMPLATE",
".devbox",
".timemachine",
},
},
},
diagnostics = {
enable = true,
icons = {
hint = "",
info = "",
warning = "",
error = "",
hint = "",
info = "",
warning = "",
error = "",
},
},
+29
View File
@@ -0,0 +1,29 @@
return {
"supermaven-inc/supermaven-nvim",
event = "InsertEnter",
cmd = { "SupermavenUseFree", "SupermavenUsePro" },
opts = {
keymaps = {
accept_suggestion = nil, -- handled by completion engine
},
},
specs = {
{
"AstroNvim/astrocore",
opts = {
options = {
g = {
-- set the ai_accept function
ai_accept = function()
local suggestion = require "supermaven-nvim.completion_preview"
if suggestion.has_suggestion() then
vim.schedule(function() suggestion.on_accept_suggestion() end)
return true
end
end,
},
},
},
},
},
}
+1 -25
View File
@@ -17,32 +17,8 @@ require("overseer").setup {
size = vim.o.columns * 0.25,
auto_scroll = true,
close_on_exit = false,
quit_on_exit = "success",
quit_on_exit = "never",
open_on_start = true,
hidden = true,
},
}
require("lspconfig").jsonls.setup {
settings = {
json = {
schemas = require("schemastore").json.schemas(),
validate = { enable = true },
},
},
}
require("lspconfig").yamlls.setup {
settings = {
yaml = {
schemaStore = {
-- You must disable built-in schemaStore support if you want to use
-- this plugin and its advanced options like `ignore`.
enable = false,
-- Avoid TypeError: Cannot read properties of undefined (reading 'length')
url = "",
},
schemas = require("schemastore").yaml.schemas(),
},
},
}