feat: bootstrap neovim configuration with Lazy.nvim and AstroNvim
This commit is contained in:
commit
08d5780f92
16 files changed
+731
No files matched your search
@@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"neodev": {
|
||||||
|
"library": {
|
||||||
|
"enabled": true,
|
||||||
|
"plugins": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"neoconf": {
|
||||||
|
"plugins": {
|
||||||
|
"lua_ls": {
|
||||||
|
"enabled": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"lspconfig": {
|
||||||
|
"lua_ls": {
|
||||||
|
"Lua.format.enable": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
column_width = 120
|
||||||
|
line_endings = "Unix"
|
||||||
|
indent_type = "Spaces"
|
||||||
|
indent_width = 2
|
||||||
|
quote_style = "AutoPreferDouble"
|
||||||
|
call_parentheses = "None"
|
||||||
|
collapse_simple_statement = "Always"
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
-- This file simply bootstraps the installation of Lazy.nvim and then calls other files for execution
|
||||||
|
-- This file doesn't necessarily need to be touched, BE CAUTIOUS editing this file and proceed at your own risk.
|
||||||
|
local lazypath = vim.env.LAZY or vim.fn.stdpath "data" .. "/lazy/lazy.nvim"
|
||||||
|
if not (vim.env.LAZY or (vim.uv or vim.loop).fs_stat(lazypath)) then
|
||||||
|
-- stylua: ignore
|
||||||
|
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath })
|
||||||
|
end
|
||||||
|
vim.opt.rtp:prepend(lazypath)
|
||||||
|
|
||||||
|
-- validate that lazy is available
|
||||||
|
if not pcall(require, "lazy") then
|
||||||
|
-- stylua: ignore
|
||||||
|
vim.api.nvim_echo({ { ("Unable to load lazy from: %s\n"):format(lazypath), "ErrorMsg" }, { "Press any key to exit...", "MoreMsg" } }, true, {})
|
||||||
|
vim.fn.getchar()
|
||||||
|
vim.cmd.quit()
|
||||||
|
end
|
||||||
|
|
||||||
|
require "lazy_setup"
|
||||||
|
require "polish"
|
||||||
|
|
||||||
@@ -0,0 +1,72 @@
|
|||||||
|
{
|
||||||
|
"AstroNvim": { "branch": "main", "commit": "1411df4d970e59f1b5721556a043c5c828daf5ad" },
|
||||||
|
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
|
||||||
|
"LuaSnip": { "branch": "master", "commit": "c9b9a22904c97d0eb69ccb9bab76037838326817" },
|
||||||
|
"SchemaStore.nvim": { "branch": "main", "commit": "171c54b58076c7454c40da4dfba1aab21171c143" },
|
||||||
|
"aerial.nvim": { "branch": "master", "commit": "2204cf08791449a6a2fd2ef187a29112eeefd989" },
|
||||||
|
"alpha-nvim": { "branch": "main", "commit": "de72250e054e5e691b9736ee30db72c65d560771" },
|
||||||
|
"astrocommunity": { "branch": "main", "commit": "349bd30fbaa0168c6dc771682637a665db293fe5" },
|
||||||
|
"astrocore": { "branch": "main", "commit": "44a3dc0bf1591022b2a6bc89dccdfac1be17bec9" },
|
||||||
|
"astrolsp": { "branch": "main", "commit": "909fbe64f3f87d089ff3777751261544557117cc" },
|
||||||
|
"astrotheme": { "branch": "main", "commit": "f12dcf64b1f9a05839c3ac2146f550f43bae9dab" },
|
||||||
|
"astroui": { "branch": "main", "commit": "eab4c97dbc6961980204e24d79700f7a3097a8d5" },
|
||||||
|
"better-escape.nvim": { "branch": "master", "commit": "199dcc2643dec5d8dbdab4ec672cf405224dcb3b" },
|
||||||
|
"blink.cmp": { "branch": "main", "commit": "dcda20d3aa345025699a920c45b0a0603551f41d" },
|
||||||
|
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
|
||||||
|
"cyberdream.nvim": { "branch": "main", "commit": "b02c977aaf0283a0ec7a0184e6a459366325c93b" },
|
||||||
|
"dressing.nvim": { "branch": "master", "commit": "2d7c2db2507fa3c4956142ee607431ddb2828639" },
|
||||||
|
"friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" },
|
||||||
|
"gitsigns.nvim": { "branch": "main", "commit": "4c40357994f386e72be92a46f41fc1664c84c87d" },
|
||||||
|
"gopher.nvim": { "branch": "main", "commit": "0ed14a40d9799ac8d92aaf9eb1cd9be22ffd6b14" },
|
||||||
|
"guess-indent.nvim": { "branch": "main", "commit": "6cd61f7a600bb756e558627cd2e740302c58e32d" },
|
||||||
|
"heirline.nvim": { "branch": "master", "commit": "af3f441ea10f96105e1af14cd37bf213533812d2" },
|
||||||
|
"inc-rename.nvim": { "branch": "main", "commit": "f9b9e5b9a75074810f40881b7e254b5bbeaf122e" },
|
||||||
|
"indent-blankline.nvim": { "branch": "master", "commit": "e10626f7fcd51ccd56d7ffc00883ba7e0aa28f78" },
|
||||||
|
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
||||||
|
"lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" },
|
||||||
|
"lazygit.nvim": { "branch": "main", "commit": "b9eae3badab982e71abab96d3ee1d258f0c07961" },
|
||||||
|
"lspkind.nvim": { "branch": "master", "commit": "d79a1c3299ad0ef94e255d045bed9fa26025dab6" },
|
||||||
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" },
|
||||||
|
"mason-null-ls.nvim": { "branch": "main", "commit": "de19726de7260c68d94691afb057fa73d3cc53e7" },
|
||||||
|
"mason-nvim-dap.nvim": { "branch": "main", "commit": "09220b99d63d5363f219daa2785242ee5fddba7f" },
|
||||||
|
"mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" },
|
||||||
|
"mini.bufremove": { "branch": "main", "commit": "bba1d8b413d37081756f59200b8cf756181e5b9a" },
|
||||||
|
"neo-tree.nvim": { "branch": "main", "commit": "2a5c86bd61e6c60ab7c2cb029c5cf619e4ee0b3a" },
|
||||||
|
"neoconf.nvim": { "branch": "main", "commit": "c215518f96a1058965fab3d1d3fd429b8b8fef1d" },
|
||||||
|
"none-ls.nvim": { "branch": "main", "commit": "a117163db44c256d53c3be8717f3e1a2a28e6299" },
|
||||||
|
"nui.nvim": { "branch": "main", "commit": "8d3bce9764e627b62b07424e0df77f680d47ffdb" },
|
||||||
|
"nvim-autopairs": { "branch": "master", "commit": "68f0e5c3dab23261a945272032ee6700af86227a" },
|
||||||
|
"nvim-colorizer.lua": { "branch": "master", "commit": "517df88cf2afb36652830df2c655df2da416a0ae" },
|
||||||
|
"nvim-dap": { "branch": "master", "commit": "8228cb00ab0850e483f8d58cc39cc580c05738d6" },
|
||||||
|
"nvim-dap-go": { "branch": "main", "commit": "8763ced35b19c8dc526e04a70ab07c34e11ad064" },
|
||||||
|
"nvim-dap-ui": { "branch": "master", "commit": "bc81f8d3440aede116f821114547a476b082b319" },
|
||||||
|
"nvim-lsp-file-operations": { "branch": "master", "commit": "9744b738183a5adca0f916527922078a965515ed" },
|
||||||
|
"nvim-lspconfig": { "branch": "master", "commit": "84e0cd5a3c58e88ef706fdf4a1eed59ded1d3ce2" },
|
||||||
|
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
|
||||||
|
"nvim-notify": { "branch": "master", "commit": "22f29093eae7785773ee9d543f8750348b1a195c" },
|
||||||
|
"nvim-rip-substitute": { "branch": "main", "commit": "ede145f6fc318dc0e15ed9a40d2a60112eaf0b5f" },
|
||||||
|
"nvim-treesitter": { "branch": "master", "commit": "f22181a62c47bf591fbfd6ada7d9a1156278d6e0" },
|
||||||
|
"nvim-treesitter-textobjects": { "branch": "master", "commit": "8b2d4d519f3516d09910f5baf48d1a47b594f0ce" },
|
||||||
|
"nvim-ts-autotag": { "branch": "main", "commit": "a1d526af391f6aebb25a8795cbc05351ed3620b5" },
|
||||||
|
"nvim-ts-context-commentstring": { "branch": "main", "commit": "1b212c2eee76d787bbea6aa5e92a2b534e7b4f8f" },
|
||||||
|
"nvim-ufo": { "branch": "main", "commit": "a52c92c3bbaa10f0c9b547a50adaa8c7d8b29f94" },
|
||||||
|
"nvim-vtsls": { "branch": "main", "commit": "45c6dfea9f83a126e9bfc5dd63430562b3f8af16" },
|
||||||
|
"nvim-web-devicons": { "branch": "master", "commit": "ab4cfee554e501f497bce0856788d43cf2eb93d7" },
|
||||||
|
"nvim-window-picker": { "branch": "main", "commit": "6382540b2ae5de6c793d4aa2e3fe6dbb518505ec" },
|
||||||
|
"overseer.nvim": { "branch": "master", "commit": "d95931e9e8cc4429819c8bbae395da00a6800d1e" },
|
||||||
|
"package-info.nvim": { "branch": "master", "commit": "3de4f3569ce60e248707df042b72769b3ec343b8" },
|
||||||
|
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
|
||||||
|
"presence.nvim": { "branch": "main", "commit": "87c857a56b7703f976d3a5ef15967d80508df6e6" },
|
||||||
|
"promise-async": { "branch": "main", "commit": "119e8961014c9bfaf1487bf3c2a393d254f337e2" },
|
||||||
|
"resession.nvim": { "branch": "master", "commit": "cc1cc9a4ed7e6f72057c265ba5cc711ec16c2cff" },
|
||||||
|
"smart-splits.nvim": { "branch": "master", "commit": "baff41c382020e8b31037ca97a3339b310c23772" },
|
||||||
|
"supermaven-nvim": { "branch": "main", "commit": "07d20fce48a5629686aefb0a7cd4b25e33947d50" },
|
||||||
|
"telescope-fzf-native.nvim": { "branch": "main", "commit": "2a5ceff981501cff8f46871d5402cd3378a8ab6a" },
|
||||||
|
"telescope-lazy.nvim": { "branch": "main", "commit": "810f7859c98e88b9c4e45de16cb5317207c9b3e8" },
|
||||||
|
"telescope.nvim": { "branch": "master", "commit": "814f102cd1da3dc78c7d2f20f2ef3ed3cdf0e6e4" },
|
||||||
|
"todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" },
|
||||||
|
"toggleterm.nvim": { "branch": "main", "commit": "e76134e682c1a866e3dfcdaeb691eb7b01068668" },
|
||||||
|
"tsc.nvim": { "branch": "main", "commit": "60c9b3e9610e24e147a928e30dd148ed9bb9f247" },
|
||||||
|
"vim-illuminate": { "branch": "master", "commit": "19cb21f513fc2b02f0c66be70107741e837516a1" },
|
||||||
|
"which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" }
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
-- AstroCommunity: import any community modules here
|
||||||
|
-- We import this file in `lazy_setup.lua` before the `plugins/` folder.
|
||||||
|
-- This guarantees that the specs are processed before any user plugins.
|
||||||
|
|
||||||
|
---@type LazySpec
|
||||||
|
return {
|
||||||
|
"AstroNvim/astrocommunity",
|
||||||
|
{ import = "astrocommunity.pack.docker" },
|
||||||
|
{ import = "astrocommunity.pack.lua" },
|
||||||
|
{ import = "astrocommunity.pack.go" },
|
||||||
|
{ import = "astrocommunity.pack.markdown" },
|
||||||
|
{ 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" },
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
require("lazy").setup({
|
||||||
|
{
|
||||||
|
"AstroNvim/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
|
||||||
|
maplocalleader = ",", -- This ensures the localleader key must be configured before Lazy is set up
|
||||||
|
icons_enabled = true, -- Set to false to disable icons (if no Nerd Font is available)
|
||||||
|
pin_plugins = nil, -- Default will pin plugins when tracking `version` of AstroNvim, set to true/false to override
|
||||||
|
update_notifications = false, -- Enable/disable notification about running `:Lazy update` twice to update pinned plugins
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{ import = "community" },
|
||||||
|
{ import = "plugins" },
|
||||||
|
} --[[@as LazySpec]], {
|
||||||
|
-- Configure any other `lazy.nvim` configuration options here
|
||||||
|
install = { colorscheme = { "cyberdream" } },
|
||||||
|
ui = { backdrop = 100 },
|
||||||
|
performance = {
|
||||||
|
rtp = {
|
||||||
|
-- disable some rtp plugins, add more to your liking
|
||||||
|
disabled_plugins = {
|
||||||
|
"gzip",
|
||||||
|
"netrwPlugin",
|
||||||
|
"tarPlugin",
|
||||||
|
"tohtml",
|
||||||
|
"zipPlugin",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
} --[[@as LazyConfig]])
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
local files = require "overseer.files"
|
||||||
|
local overseer = require "overseer"
|
||||||
|
|
||||||
|
---@type overseer.TemplateFileDefinition
|
||||||
|
local tmpl = {
|
||||||
|
priority = 60,
|
||||||
|
params = {
|
||||||
|
args = { optional = true, type = "list", delimiter = " " },
|
||||||
|
cwd = { optional = true },
|
||||||
|
},
|
||||||
|
builder = function(params)
|
||||||
|
return {
|
||||||
|
cmd = { "sh" },
|
||||||
|
args = { "-c", table.concat(params.args, " && ") },
|
||||||
|
cwd = params.cwd,
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
|
||||||
|
---@param opts overseer.SearchParams
|
||||||
|
---@return string|nil
|
||||||
|
local function get_devbox_file(opts)
|
||||||
|
return vim.fs.find("devbox.json", {
|
||||||
|
upward = true,
|
||||||
|
type = "file",
|
||||||
|
path = opts.dir,
|
||||||
|
})[1]
|
||||||
|
end
|
||||||
|
|
||||||
|
return {
|
||||||
|
cache_key = function(opts) return get_devbox_file(opts) end,
|
||||||
|
condition = {
|
||||||
|
callback = function(opts)
|
||||||
|
local devbox_file = get_devbox_file(opts)
|
||||||
|
if not devbox_file then return false, "No devbox.json file found" end
|
||||||
|
return true
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
generator = function(opts, cb)
|
||||||
|
local devbox_file = get_devbox_file(opts)
|
||||||
|
if not devbox_file then
|
||||||
|
cb {}
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local data = files.load_json_file(devbox_file)
|
||||||
|
local ret = {}
|
||||||
|
if data.shell and data.shell.scripts then
|
||||||
|
for k, v in pairs(data.shell.scripts) do
|
||||||
|
table.insert(
|
||||||
|
ret,
|
||||||
|
overseer.wrap_template(
|
||||||
|
tmpl,
|
||||||
|
{ name = string.format("devbox run %s", k) },
|
||||||
|
{ args = v, cwd = vim.fs.dirname(devbox_file) }
|
||||||
|
)
|
||||||
|
)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
cb(ret)
|
||||||
|
end,
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
-- /home/stevearc/.config/nvim/lua/overseer/template/user/run_script.lua
|
||||||
|
return {
|
||||||
|
name = "run script",
|
||||||
|
builder = function()
|
||||||
|
local file = vim.fn.expand "%:p"
|
||||||
|
local cmd = { file }
|
||||||
|
if vim.bo.filetype == "templ" then cmd = { "templ", "generate" } end
|
||||||
|
return {
|
||||||
|
cmd = cmd,
|
||||||
|
components = {
|
||||||
|
{ "on_output_quickfix", set_diagnostics = true },
|
||||||
|
"on_result_diagnostics",
|
||||||
|
"default",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
condition = {
|
||||||
|
filetype = { "templ" },
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -0,0 +1,90 @@
|
|||||||
|
-- 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
|
||||||
|
opts = {
|
||||||
|
rooter = {
|
||||||
|
-- list of detectors in order of prevalence, elements can be:
|
||||||
|
-- "lsp" : lsp detection
|
||||||
|
-- string[] : a list of directory patterns to look for
|
||||||
|
-- fun(bufnr: integer): string|string[] : a function that takes a buffer number and outputs detected roots
|
||||||
|
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`
|
||||||
|
},
|
||||||
|
-- ignore things from root detection
|
||||||
|
ignore = {
|
||||||
|
servers = {}, -- list of language server names to ignore (Ex. { "efm" })
|
||||||
|
dirs = {}, -- list of directory patterns (Ex. { "~/.cargo/*" })
|
||||||
|
},
|
||||||
|
-- automatically update working directory (update manually with `:AstroRoot`)
|
||||||
|
autochdir = true,
|
||||||
|
-- scope of working directory to change ("global"|"tab"|"win")
|
||||||
|
scope = "tab",
|
||||||
|
-- show notification on every working directory change
|
||||||
|
notify = false,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Configure core features of AstroNvim
|
||||||
|
features = {
|
||||||
|
autopairs = true, -- enable autopairs at start
|
||||||
|
diagnostics_mode = 3, -- diagnostic mode on start (0 = off, 1 = no signs/virtual text, 2 = no virtual text, 3 = on)
|
||||||
|
highlighturl = true, -- highlight URLs at start
|
||||||
|
notifications = false, -- enable notifications at start
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Diagnostics configuration (for vim.diagnostics.config({...})) when diagnostics are on
|
||||||
|
diagnostics = {
|
||||||
|
virtual_text = true,
|
||||||
|
underline = true,
|
||||||
|
},
|
||||||
|
-- vim options can be configured here
|
||||||
|
options = {
|
||||||
|
opt = { -- vim.opt.<key>
|
||||||
|
relativenumber = false, -- sets vim.opt.relativenumber
|
||||||
|
number = true, -- sets vim.opt.number
|
||||||
|
spell = false, -- sets vim.opt.spell
|
||||||
|
wrap = true, -- sets vim.opt.wrap
|
||||||
|
},
|
||||||
|
g = { -- vim.g.<key>
|
||||||
|
-- configure global vim variables (vim.g)
|
||||||
|
-- NOTE: `mapleader` and `maplocalleader` must be set in the AstroNvim opts or before `lazy.setup`
|
||||||
|
-- This can be found in the `lua/lazy_setup.lua` file
|
||||||
|
},
|
||||||
|
},
|
||||||
|
-- Mappings can be configured through AstroCore as well.
|
||||||
|
-- NOTE: keycodes follow the casing in the vimdocs. For example, `<Leader>` must be capitalized
|
||||||
|
mappings = {
|
||||||
|
-- first key is the mode
|
||||||
|
n = {
|
||||||
|
-- navigate buffer tabs
|
||||||
|
["L"] = { function() require("astrocore.buffer").nav(vim.v.count1) end, desc = "Next buffer" },
|
||||||
|
["H"] = { function() require("astrocore.buffer").nav(-vim.v.count1) end, desc = "Previous buffer" },
|
||||||
|
["K"] = { "g;", desc = "Go to previous edited line" },
|
||||||
|
["J"] = { "g,", desc = "Go to next edited line" },
|
||||||
|
["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" },
|
||||||
|
["<C-r>"] = { vim.lsp.buf.rename, desc = "LSP Rename Symbol" },
|
||||||
|
["<C-e>"] = { "<Cmd>Neotree toggle<CR>", desc = "Show Explorer" },
|
||||||
|
["<C-p>"] = { "p", desc = "Paste" },
|
||||||
|
},
|
||||||
|
v = {
|
||||||
|
["<C-e>"] = { "<Cmd>Neotree toggle<CR>", desc = "Show Explorer" },
|
||||||
|
},
|
||||||
|
t = {
|
||||||
|
["<Esc>"] = { [[<C-\><C-n>]], desc = "Exit terminal mode" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
---@type LazySpec
|
||||||
|
return {
|
||||||
|
"AstroNvim/astroui",
|
||||||
|
---@type AstroUIOpts
|
||||||
|
opts = {
|
||||||
|
-- change colorscheme
|
||||||
|
colorscheme = "cyberdream",
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -0,0 +1,246 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"neo-tree.nvim",
|
||||||
|
opts = {
|
||||||
|
popup_border_style = "rounded",
|
||||||
|
enable_git_status = true,
|
||||||
|
enable_diagnostics = true,
|
||||||
|
sort_case_insensitive = false,
|
||||||
|
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.
|
||||||
|
default_component_configs = {
|
||||||
|
container = {
|
||||||
|
enable_character_fade = true,
|
||||||
|
},
|
||||||
|
indent = {
|
||||||
|
indent_size = 1,
|
||||||
|
padding = 1, -- extra padding on left hand side
|
||||||
|
-- indent guides
|
||||||
|
with_markers = true,
|
||||||
|
indent_marker = "│",
|
||||||
|
last_indent_marker = "└",
|
||||||
|
highlight = "NeoTreeIndentMarker",
|
||||||
|
-- expander config, needed for nesting files
|
||||||
|
expander_collapsed = "",
|
||||||
|
expander_expanded = "",
|
||||||
|
expander_highlight = "NeoTreeExpander",
|
||||||
|
},
|
||||||
|
name = {
|
||||||
|
trailing_slash = false, -- append a trailing slash to folder names
|
||||||
|
use_git_status_colors = true, -- use git status colors instead of the default colors
|
||||||
|
highlight = "NeoTreeFileName",
|
||||||
|
},
|
||||||
|
git_status = {
|
||||||
|
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
|
||||||
|
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 = "",
|
||||||
|
unstaged = "",
|
||||||
|
staged = "",
|
||||||
|
conflict = "",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
-- If you don't want to use these columns, you can set `enabled = false` for each of them individually
|
||||||
|
file_size = {
|
||||||
|
enabled = true,
|
||||||
|
width = 12, -- width of the column
|
||||||
|
required_width = 64, -- min width of window required to show this column
|
||||||
|
},
|
||||||
|
type = {
|
||||||
|
enabled = true,
|
||||||
|
width = 10, -- width of the column
|
||||||
|
required_width = 122, -- min width of window required to show this column
|
||||||
|
},
|
||||||
|
last_modified = {
|
||||||
|
enabled = true,
|
||||||
|
width = 20, -- width of the column
|
||||||
|
required_width = 88, -- min width of window required to show this column
|
||||||
|
},
|
||||||
|
created = {
|
||||||
|
enabled = true,
|
||||||
|
width = 20, -- width of the column
|
||||||
|
required_width = 110, -- min width of window required to show this column
|
||||||
|
},
|
||||||
|
symlink_target = {
|
||||||
|
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,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Filesystem specific settings
|
||||||
|
filesystem = {
|
||||||
|
commands = {
|
||||||
|
-- If item is a file it will close neotree after opening it.
|
||||||
|
open_and_close_neotree = function(state)
|
||||||
|
require("neo-tree.sources.filesystem.commands").open(state)
|
||||||
|
|
||||||
|
local tree = state.tree
|
||||||
|
local success, node = pcall(tree.get_node, tree)
|
||||||
|
|
||||||
|
if not success then return end
|
||||||
|
|
||||||
|
if node.type == "file" then require("neo-tree.command").execute { action = "close" } end
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
bind_to_cwd = true,
|
||||||
|
follow_current_file = {
|
||||||
|
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_gitignored = true,
|
||||||
|
hide_by_pattern = {
|
||||||
|
"dist",
|
||||||
|
".python-version",
|
||||||
|
"*_test.go",
|
||||||
|
"*.pb.go",
|
||||||
|
"*_templ.go",
|
||||||
|
"buf.gen.*",
|
||||||
|
"mprocs.*",
|
||||||
|
"*config.*.js",
|
||||||
|
"*config.js",
|
||||||
|
"deps.mjs",
|
||||||
|
"test_*.go",
|
||||||
|
".trunk",
|
||||||
|
},
|
||||||
|
hide_by_name = {
|
||||||
|
".github",
|
||||||
|
".taskfiles",
|
||||||
|
"types",
|
||||||
|
".gitignore",
|
||||||
|
"analysis_options.yaml",
|
||||||
|
"decorators",
|
||||||
|
"slumber.yml",
|
||||||
|
"CHANGELOG.md",
|
||||||
|
"devbox.d",
|
||||||
|
"package-lock.json",
|
||||||
|
".husky",
|
||||||
|
"translations",
|
||||||
|
"test",
|
||||||
|
"networks",
|
||||||
|
"go.mod",
|
||||||
|
"LICENSE.md",
|
||||||
|
"CONTRIBUTING.md",
|
||||||
|
},
|
||||||
|
never_show_by_pattern = {
|
||||||
|
"PULL_REQUEST_TEMPLATE.md",
|
||||||
|
".trunk",
|
||||||
|
".editorconfig",
|
||||||
|
".eslint*",
|
||||||
|
"*.min.js",
|
||||||
|
".gitpod.*",
|
||||||
|
"cspell.*",
|
||||||
|
"*.lock",
|
||||||
|
"*.lockb",
|
||||||
|
"*.pulsar.go",
|
||||||
|
"*.pb.gorm.go",
|
||||||
|
"*.pb.gw.go",
|
||||||
|
"*_templ.go",
|
||||||
|
"*.tmp",
|
||||||
|
"*.work.*",
|
||||||
|
"*.sum",
|
||||||
|
".wrangler",
|
||||||
|
"*.wasm",
|
||||||
|
"*.png",
|
||||||
|
"*.min.js",
|
||||||
|
"*.jpg",
|
||||||
|
"*.icns",
|
||||||
|
"*.ico",
|
||||||
|
"build",
|
||||||
|
"PklProject.deps.json",
|
||||||
|
"*.iml",
|
||||||
|
},
|
||||||
|
never_show = {
|
||||||
|
".dart_tool",
|
||||||
|
".idea",
|
||||||
|
".metadata",
|
||||||
|
".venv",
|
||||||
|
"zkp",
|
||||||
|
"ted25519",
|
||||||
|
"dkg",
|
||||||
|
"ecies",
|
||||||
|
"ot",
|
||||||
|
"paillier",
|
||||||
|
"sharing",
|
||||||
|
"signatures",
|
||||||
|
"subtle",
|
||||||
|
"bulletproof",
|
||||||
|
"dkg",
|
||||||
|
"daed",
|
||||||
|
".gradle",
|
||||||
|
"gradle.bat",
|
||||||
|
".aider.chat.history.md",
|
||||||
|
".aider.input.history",
|
||||||
|
".aider.tags.cache.v3",
|
||||||
|
".devcontainer",
|
||||||
|
"heighliner",
|
||||||
|
".tmp",
|
||||||
|
".zed",
|
||||||
|
".vscode",
|
||||||
|
"go.work.sum",
|
||||||
|
".DS_Store",
|
||||||
|
".git",
|
||||||
|
"LICENSE",
|
||||||
|
"interchaintest",
|
||||||
|
".envrc",
|
||||||
|
"tmp",
|
||||||
|
"sonr.log",
|
||||||
|
"DISCUSSION_TEMPLATE",
|
||||||
|
"ISSUE_TEMPLATE",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
diagnostics = {
|
||||||
|
enable = true,
|
||||||
|
icons = {
|
||||||
|
hint = "",
|
||||||
|
info = "",
|
||||||
|
warning = "",
|
||||||
|
error = "",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
source_selector = {
|
||||||
|
winbar = false,
|
||||||
|
statusline = false,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Main sources
|
||||||
|
sources = {
|
||||||
|
"filesystem",
|
||||||
|
"diagnostics",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -0,0 +1,69 @@
|
|||||||
|
-- You can also add or configure plugins by creating files in this `plugins/` folder
|
||||||
|
-- Here are some examples:
|
||||||
|
|
||||||
|
---@type LazySpec
|
||||||
|
return {
|
||||||
|
"andweeb/presence.nvim",
|
||||||
|
{
|
||||||
|
"kdheepak/lazygit.nvim",
|
||||||
|
lazy = true,
|
||||||
|
cmd = {
|
||||||
|
"LazyGit",
|
||||||
|
"LazyGitConfig",
|
||||||
|
"LazyGitCurrentFile",
|
||||||
|
"LazyGitFilter",
|
||||||
|
"LazyGitFilterCurrentFile",
|
||||||
|
},
|
||||||
|
-- optional for floating window border decoration
|
||||||
|
dependencies = {
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
},
|
||||||
|
-- setting the keybinding for LazyGit with 'keys' is recommended in
|
||||||
|
-- order to load the plugin when the command is run for the first time
|
||||||
|
keys = {
|
||||||
|
{ "<C-g>", "<cmd>LazyGit<cr>", desc = "LazyGit" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"chrisgrieser/nvim-rip-substitute",
|
||||||
|
cmd = "RipSubstitute",
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
"<C-f>",
|
||||||
|
function() require("rip-substitute").sub() end,
|
||||||
|
mode = { "n", "x" },
|
||||||
|
desc = " rip substitute",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
-- disable neo-tree
|
||||||
|
{
|
||||||
|
"goolord/alpha-nvim",
|
||||||
|
enabled = true,
|
||||||
|
opts = function(_, opts)
|
||||||
|
-- customize the dashboard header
|
||||||
|
opts.section.header.val = {
|
||||||
|
" ▗▄████▄▖ ",
|
||||||
|
" ▟███▛███▛▘ ",
|
||||||
|
" ▄███▜▝ ▘▀ ▗ ",
|
||||||
|
" ▗▟██▜▞▘ ▟██▖ ",
|
||||||
|
" ▟██▛█▘ ▄▙▖ ▝▜█▜█▙ ",
|
||||||
|
"▟██▜▀ ▄████▄ ▀██▟▙",
|
||||||
|
"██▟▌ ▐████▟█▜ ▐▟██",
|
||||||
|
"▜▛██▄ ▀▜▟█▛▀ ▄██▛▛",
|
||||||
|
" ▜█▛█▙▖ ▝▀▌▘ ▗▟█▟▙▛ ",
|
||||||
|
" ▝▜█▛▘ ▟██▟█▘ ",
|
||||||
|
" ▘ ▄▄ ▄███▟▀ ",
|
||||||
|
" ▗▟▜▛██▜█▜▞▘ ",
|
||||||
|
" ▝▀████▀▘ ",
|
||||||
|
}
|
||||||
|
return opts
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Add SchemaStore.nvim to your plugin
|
||||||
|
{
|
||||||
|
"b0o/SchemaStore.nvim",
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
-- 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
|
||||||
|
|
||||||
|
require("telescope").setup {
|
||||||
|
pickers = {
|
||||||
|
oldfiles = {
|
||||||
|
cwd_only = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
require("overseer").setup {
|
||||||
|
strategy = {
|
||||||
|
"toggleterm",
|
||||||
|
use_shell = false,
|
||||||
|
size = vim.o.columns * 0.25,
|
||||||
|
auto_scroll = true,
|
||||||
|
close_on_exit = false,
|
||||||
|
quit_on_exit = "success",
|
||||||
|
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(),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
base: lua51
|
||||||
|
|
||||||
|
globals:
|
||||||
|
vim:
|
||||||
|
any: true
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
std = "neovim"
|
||||||
|
|
||||||
|
[rules]
|
||||||
|
global_usage = "allow"
|
||||||
|
if_same_then_else = "allow"
|
||||||
|
incorrect_standard_library_use = "allow"
|
||||||
|
mixed_table = "allow"
|
||||||
|
multiple_statements = "allow"
|
||||||
Reference in new issue
Block a user