22 Commits

Author SHA1 Message Date
naps62 4db90cb097 feat(treesitter): add diff, gitcommit and missing parsers
diff and gitcommit cover commit buffers and diff output. cpp, kotlin and
nix were formatted by conform with no parser installed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 13:00:47 +00:00
naps62 26643d8ba8 feat(git): add gitsigns hunk keymaps, drop diffview
Gitsigns was configured with sign glyphs and no bindings at all, so
hunks were visible but not navigable — the main thing you do when
reading back what an agent changed. Adds ]c/[c, preview, reset, blame
and diffthis, buffer-local on attach.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 13:00:47 +00:00
naps62 98dc1ba7f2 fix(lsp): drop hand-rolled biome config
root_dir was computed once, at startup, against whatever buffer happened
to be current — freezing one path for the session and breaking
lspconfig's local-binary lookup, which reads config.root_dir.

Everything overridden here is already handled better upstream: cmd
prefers the project-local biome, root_dir is monorepo-aware and resolved
per buffer, the filetypes list is wider, and the server only attaches
where a biome config applies. Only the formatting opt-out stays, since
conform owns that.

Also adds virtual_lines for the line under the cursor, which pairs with
the existing virtual_text = false.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 13:00:47 +00:00
naps62 933ffe7cf5 fix(picker): actually disable telescope
Telescope ships in NvChad's own plugin set, so dropping it from neogit's
dependencies never removed it — it kept reinstalling. Disable it the same
way nvim-tree is disabled, and repoint the ten NvChad mappings that drove
it: five are already covered by fzf.lua bindings and are dropped, the
other five move to fzf-lua.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 13:00:35 +00:00
naps62 a23e15d9da fix(lsp): stop dropping LSP plugins on a cold clone
This file required configs.lspconfig at spec-import time, which pulls in
nvchad.configs.lspconfig. On a fresh clone NvChad is not installed yet,
so the import threw and lazy skipped every spec below it — rustaceanvim,
typescript-tools, actions-preview, nui and lsp-endhints were all missing
until the second launch. Verified against a wiped profile.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 13:00:35 +00:00
naps62 56320c8cf4 docs: replace NvChad boilerplate readme
The old one was the upstream starter's text: it told the reader to
delete .git and fork, and said nothing about this config.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 12:49:13 +00:00
naps62 fb94047bff chore: remove dead config and test residue
- inlay_hints = { enable = true } on lua_ls and solidity_ls: nothing in
  nvim's LSP core reads that key. vim.lsp.inlay_hint.enable() already
  turns them on.
- commented-out wgsl_analyzer block
- <leader>rn in on_attach: mappings.lua already binds it globally to the
  same vim.lsp.buf.rename
- mini.files enabled = false: NvChad does not ship it, so there was
  nothing to disable. The nvim-tree stub stays; that one is real.
- biome.json and .tool-versions: no JS in this repo

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 12:49:10 +00:00
naps62 b58c9b182d fix(cmp): correct dead path source name
The only path provider installed is cmp-async-path, which registers as
`async_path`. Our sources list overrode NvChad's index-by-index, so slot
5 became `path` — a name no source claims — and path completion silently
did nothing.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 12:49:02 +00:00
naps62 6795920741 refactor(conform): format on demand, not on save
Agents run stylua/biome/rustfmt themselves, and a save-time reformat
races their in-flight writes to the same buffer. Timeout and LSP
fallback move to default_format_opts so <leader>fm (NvChad's binding)
keeps the same behaviour; conform now lazy-loads on first use.

Drops the /contrib/ skip — explicit invocation is already the opt-in.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 09:07:19 +00:00
naps62 bec6a2f7ef chore(plugins): purge typing-era tooling
Agent-driven work shifted nvim from writing code to reading and
reviewing it. Dropped:

- supermaven-nvim: inline AI completion duplicates the agent
- nvim-spectre: project-wide find/replace is now a prose request
- tailwind-tools: authoring aid for markup not hand-written
- editing.lua: hop.nvim plus ~85 lines of commented-out plugins
  (hardtime, ufo, local-highlight)
- telescope.nvim: second picker; gd/gv/gr now use fzf-lua, which
  was already bound to lsp_references

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 09:05:38 +00:00
Miguel Palhas 020bf7716e fix(config): cleanup bugs, redundancy, and add agent-friendly auto-reload
- remove broken mini.files mappings (plugin disabled; yazi is used now)
- dedupe tint.nvim spec (drop plugins/theme.lua, keep ui.lua)
- drop dead copilot cmp source + moot Supermaven symbol (Supermaven stays inline)
- remove yaml from biome formatters (biome has no yaml support)
- collapse 3x biome chain to a single biome-check pass
- remove duplicate insert-mode jk mapping
- lazy-load tailwind-tools by filetype
- diagnostics: update_in_insert = false
- untrack .nvimlog, add .gitignore
- auto-reload files changed on disk (autoread + checktime autocmds)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-29 14:12:45 +01:00
naps62 35370b831c fix(treesitter): pin to archived master branch
The config uses the legacy `nvim-treesitter.configs` API, which the
`main` rewrite dropped. Without an explicit branch pin, `Lazy sync`
jumped to `main` and broke startup (module 'nvim-treesitter.configs'
not found). Pin both treesitter and treesitter-textobjects to `master`
and refresh the lockfile to a known-good synced state.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-15 16:16:09 +00:00
Miguel Palhas 7c227632f1 wip 2026-03-28 16:43:55 +00:00
Miguel Palhas b03446da86 remove theme sync 2026-03-26 16:06:11 +00:00
Miguel Palhas a6caf577a1 replace mini.files in favor of yazi.nvim 2026-03-03 11:07:43 +00:00
Miguel Palhas 6b62931c52 wip 2026-02-21 14:59:54 +00:00
Miguel Palhas 671b8fa16c wip 2026-02-21 14:51:03 +00:00
Miguel Palhas 5bf7c0a698 wip 2026-02-21 14:49:57 +00:00
Miguel Palhas 0b4856dc00 fix mappings 2026-02-21 14:45:32 +00:00
Miguel Palhas c9f4b70e62 baleia.nvim 2026-02-18 14:05:50 +00:00
Miguel Palhas 562ac89abb remove auto theme switch (leave that to darkman) 2026-02-18 10:19:09 +00:00
Miguel Palhas a16bb42a45 auto dark/light theme (from darkman) 2026-02-16 16:39:45 +00:00
24 changed files with 292 additions and 444 deletions
+8
View File
@@ -0,0 +1,8 @@
{
"permissions": {
"allow": [
"Bash(NVIM_APPNAME=nvchad-test nvim:*)",
"Bash(darkman get:*)"
]
}
}
+1
View File
@@ -0,0 +1 @@
.nvimlog
+84 -6
View File
@@ -1,9 +1,87 @@
**This repo is supposed to used as config by NvChad users!**
# nvim-config
- The main nvchad repo (NvChad/NvChad) is used as a plugin by this repo.
- So you just import its modules , like `require "nvchad.options" , require "nvchad.mappings"`
- So you can delete the .git from this repo ( when you clone it locally ) or fork it :)
Personal Neovim config, built on [NvChad](https://github.com/NvChad/NvChad) v2.5
and managed with [lazy.nvim](https://github.com/folke/lazy.nvim).
# Credits
It is shaped around agent-driven development: most code arrives from a coding
agent, so the editor is tuned for reading, navigating and reviewing rather than
for typing volume. Concretely, that means no inline AI completion, no
format-on-save, and buffers that reload themselves when a file changes on disk
(`lua/autocmds.lua`).
1) Lazyvim starter https://github.com/LazyVim/starter as nvchad's starter was inspired by Lazyvim's . It made a lot of things easier!
## Install
```sh
git clone https://git.naps.pt/naps62/nvim-config ~/.config/nvim
nvim
```
Plugins install on first launch. Tested on Neovim 0.12.
## External dependencies
`fzf`, `ripgrep`, `bat`, `yazi`, and `delta`. Language servers and formatters
are expected on `$PATH` — see `lua/configs/lspconfig.lua` and
`lua/configs/conform.lua` for the list.
## Keymaps
Leader is `<Space>`. NvChad's defaults apply except where overridden in
`lua/mappings.lua`.
### Navigation
| Key | Action |
| --- | --- |
| `<C-p>` | Find files |
| `<C-f>` | Live grep |
| `<C-g>` | Git status |
| `<leader>b` | Buffers |
| `<leader>fo` | Old files |
| `<leader>fz` | Find in current buffer |
| `<leader>fh` | Help tags |
| `<leader>ma` | Marks |
| `<leader>y` / `<leader>Y` | Yazi at current file / cwd |
### LSP
| Key | Action |
| --- | --- |
| `gd` / `gv` | Definitions, in place / in a vertical split |
| `gr` | References |
| `ga` | Code actions (previewed) |
| `<leader>rn` | Rename |
| `<leader>fm` | Format buffer or selection |
### Diagnostics
| Key | Action |
| --- | --- |
| `<leader>xx` / `<leader>xX` | Diagnostics, workspace / buffer |
| `<leader>dn` / `<leader>dp` | Next / previous diagnostic |
| `<leader>o` | Symbol outline |
| `<leader>xt` | TODO comments |
### Git
| Key | Action |
| --- | --- |
| `<leader>g` | Neogit |
| `<leader>cm` | Git commits |
| `]c` / `[c` | Next / previous hunk |
| `<leader>hp` | Preview hunk |
| `<leader>hr` | Reset hunk |
| `<leader>hb` | Blame line |
| `<leader>hd` | Diff buffer against index |
| `co` / `ct` / `cb` / `c0` | Resolve conflict: ours / theirs / both / none |
### Editing
| Key | Action |
| --- | --- |
| `;` | Enter command mode |
| `jj` / `jk` | Leave insert mode |
| `<C-s>` | Save |
| `<leader>q` | Close window |
| `<leader>,` | Clear search highlight |
| `<C-space>` | Expand treesitter selection |
-1
View File
@@ -1 +0,0 @@
{}
+3 -2
View File
@@ -26,11 +26,12 @@ require("lazy").setup({
}, lazy_config)
-- load theme
dofile(vim.g.base46_cache .. "defaults")
dofile(vim.g.base46_cache .. "statusline")
pcall(dofile, vim.g.base46_cache .. "defaults")
pcall(dofile, vim.g.base46_cache .. "statusline")
require "options"
require "nvchad.autocmds"
require "autocmds"
vim.schedule(function()
require "mappings"
+24 -29
View File
@@ -1,53 +1,48 @@
{
"LuaSnip": { "branch": "master", "commit": "dae4f5aaa3574bd0c2b9dd20fb9542a02c10471c" },
"NvChad": { "branch": "v2.5", "commit": "c57b82473b821274f6017eb03582ba1d13be9d8c" },
"actions-preview.nvim": { "branch": "master", "commit": "cb938c25edaac38d362555f19244a9cb85d561e8" },
"LuaSnip": { "branch": "master", "commit": "0abc8f390b278c3b4aabc4c004ac8a088b65cf24" },
"NvChad": { "branch": "v2.5", "commit": "d042cc975247c2aa55fcb228e5d146dc1dc6c648" },
"actions-preview.nvim": { "branch": "master", "commit": "0ac9c2aa3cfc8c885321c0862b50b6b1c3392405" },
"baleia.nvim": { "branch": "main", "commit": "32617940adb2eea56e85a64883a19961ceac9641" },
"base46": { "branch": "v3.0", "commit": "884b990dcdbe07520a0892da6ba3e8d202b46337" },
"cmp-async-path": { "branch": "main", "commit": "f8af3f726e07f2e9d37672eaa9102581aefce149" },
"cmp-async-path": { "branch": "main", "commit": "98185a91d49ff5dd249aebf2f7456e18063fa2a0" },
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
"cmp-nvim-lsp": { "branch": "main", "commit": "cbc7b02bb99fae35cb42f514762b89b5126651ef" },
"cmp-nvim-lua": { "branch": "main", "commit": "e3a22cb071eb9d6508a156306b102c45cd2d573d" },
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
"conform.nvim": { "branch": "master", "commit": "c2526f1cde528a66e086ab1668e996d162c75f4f" },
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
"conform.nvim": { "branch": "master", "commit": "619363c30309d29ffa631e67c8183f2a72caa373" },
"friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" },
"fzf-lua": { "branch": "main", "commit": "c9e07380df2826c63a8ae396559872b2553c22bc" },
"fzf-lua": { "branch": "main", "commit": "988416cc782dfe28bff3f0da9b8c943b236cd86a" },
"git-conflict.nvim": { "branch": "main", "commit": "a1badcd070d176172940eb55d9d59029dad1c5a6" },
"gitsigns.nvim": { "branch": "main", "commit": "abf82a65f185bd54adc0679f74b7d6e1ada690c9" },
"hop.nvim": { "branch": "master", "commit": "08ddca799089ab96a6d1763db0b8adc5320bf050" },
"indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" },
"gitsigns.nvim": { "branch": "main", "commit": "25050e4ed39e628282831d4cbecb1850454ce915" },
"indent-blankline.nvim": { "branch": "master", "commit": "d28a3f70721c79e3c5f6693057ae929f3d9c0a03" },
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
"lspkind.nvim": { "branch": "master", "commit": "c7274c48137396526b59d86232eabcdc7fed8a32" },
"mason.nvim": { "branch": "main", "commit": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65" },
"mdx.nvim": { "branch": "main", "commit": "30222997ed4c0c7cc7447c4fce360fce87101bbf" },
"mason.nvim": { "branch": "main", "commit": "2a6940af80375532e5e9e7c1f2fc6319a1b7a69d" },
"mdx.nvim": { "branch": "main", "commit": "6c3dc7c4a4b58b5d86404c21a9b4655282ca08c5" },
"menu": { "branch": "main", "commit": "7a0a4a2896b715c066cfbe320bdc048091874cc6" },
"mini.files": { "branch": "main", "commit": "fafacfecdd6c5a66bb10d173a749f3c098e84498" },
"minty": { "branch": "main", "commit": "aafc9e8e0afe6bf57580858a2849578d8d8db9e0" },
"neogit": { "branch": "master", "commit": "73870229977fdd8747025820e15e98cfde787b9c" },
"neogit": { "branch": "master", "commit": "5d1b65d6215928e941e1a6a4e76e02fd45ada31f" },
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
"nvim-autopairs": { "branch": "master", "commit": "007047febaa3681a8d2f3dd5126fdb9c6e81f393" },
"nvim-cmp": { "branch": "main", "commit": "da88697d7f45d16852c6b2769dc52387d1ddc45f" },
"nvim-lsp-endhints": { "branch": "main", "commit": "b554a53e8c8a039d48ec5e9e581cb62cd1127dcd" },
"nvim-lspconfig": { "branch": "master", "commit": "238583bb00770b079c68c69a860d65e5d1d8acf9" },
"nvim-spectre": { "branch": "master", "commit": "72f56f7585903cd7bf92c665351aa585e150af0f" },
"nvim-autopairs": { "branch": "master", "commit": "7b9923abad60b903ece7c52940e1321d39eccc79" },
"nvim-cmp": { "branch": "main", "commit": "a1d504892f2bc56c2e79b65c6faded2fd21f3eca" },
"nvim-lsp-endhints": { "branch": "main", "commit": "a86e7ca7a92ef003008d7eb5d153c63bcc89f79c" },
"nvim-lspconfig": { "branch": "master", "commit": "a683e0ddf0cf64c6cd689e18ffb480ade3c162b7" },
"nvim-tree.lua": { "branch": "master", "commit": "3fb91e18a727ecc0385637895ec397dea90be42a" },
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
"nvim-treesitter": { "branch": "master", "commit": "cf12346a3414fa1b06af75c79faebe7f76df080a" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "5ca4aaa6efdcc59be46b95a3e876300cfead05ef" },
"nvim-ts-context-commentstring": { "branch": "main", "commit": "1b212c2eee76d787bbea6aa5e92a2b534e7b4f8f" },
"nvim-web-devicons": { "branch": "master", "commit": "803353450c374192393f5387b6a0176d0972b848" },
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
"nvim-ts-context-commentstring": { "branch": "main", "commit": "6141a40173c6efa98242dc951ed4b6f892c97027" },
"nvim-web-devicons": { "branch": "master", "commit": "dfbfaa967a6f7ec50789bead7ef87e336c1fa63c" },
"plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" },
"ron.vim": { "branch": "master", "commit": "f749e543975a82e8dd9a6e7df9600a1c098ae800" },
"rustaceanvim": { "branch": "master", "commit": "88575b98bb9937fb9983ddec5e532b67e75ce677" },
"rustaceanvim": { "branch": "main", "commit": "88575b98bb9937fb9983ddec5e532b67e75ce677" },
"statuscol.nvim": { "branch": "main", "commit": "c46172d0911aa5d49ba5f39f4351d1bb7aa289cc" },
"supermaven-nvim": { "branch": "main", "commit": "07d20fce48a5629686aefb0a7cd4b25e33947d50" },
"tailwind-tools": { "branch": "master", "commit": "fbe982901d4508b0dcd80e07addf0fcb6dab6c49" },
"telescope.nvim": { "branch": "master", "commit": "ad7d9580338354ccc136e5b8f0aa4f880434dcdc" },
"tint.nvim": { "branch": "master", "commit": "586e87f00c8b0f5e857cefe10839e41f3e8c6d01" },
"todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" },
"trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" },
"typescript-tools.nvim": { "branch": "master", "commit": "c2f5910074103705661e9651aa841e0d7eea9932" },
"ui": { "branch": "v3.0", "commit": "cb75908a86720172594b30de147272c1b3a7f452" },
"ui": { "branch": "v3.0", "commit": "3e67e9d5325fd47fdbc90ca00a147db2f3525754" },
"vim-kitty": { "branch": "main", "commit": "cd72f2d9cfee8d6aba5a180a5ac3ca265b5d3a46" },
"volt": { "branch": "main", "commit": "620de1321f275ec9d80028c68d1b88b409c0c8b1" },
"which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" }
"which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" },
"yazi.nvim": { "branch": "main", "commit": "7514be498c56f2a57e5a72faf55c517b9576665b" }
}
+22
View File
@@ -0,0 +1,22 @@
-- Reload buffers when their file changes on disk (e.g. edited by a coding agent).
-- `autoread` (set in options.lua) only takes effect when something triggers a check,
-- so we run `checktime` on focus/movement/buffer events. Event-based only: no idle
-- polling, so there's zero overhead when nvim is sitting still.
local grp = vim.api.nvim_create_augroup("auto_reload", { clear = true })
vim.api.nvim_create_autocmd({ "FocusGained", "BufEnter", "CursorHold", "CursorHoldI", "TermClose", "TermLeave" }, {
group = grp,
callback = function()
-- skip while typing a command or in the command-line window
if vim.fn.mode() ~= "c" and vim.fn.getcmdwintype() == "" then
vim.cmd "silent! checktime"
end
end,
})
vim.api.nvim_create_autocmd("FileChangedShellPost", {
group = grp,
callback = function()
vim.notify("File reloaded (changed on disk)", vim.log.levels.INFO)
end,
})
+1 -4
View File
@@ -4,20 +4,17 @@ local nvchad_options = require "nvchad.configs.cmp"
local options = {
sources = {
-- { name = "supermaven" },
{ name = "nvim_lsp" },
{ name = "luasnip" },
{ name = "copilot" },
{ name = "buffer" },
{ name = "nvim_lua" },
{ name = "path" },
{ name = "async_path" },
},
formatting = {
format = lspkind.cmp_format {
mode = "symbol",
max_width = 50,
symbol_map = { Supermaven = "" },
},
},
}
+10 -15
View File
@@ -2,10 +2,10 @@ local options = {
formatters_by_ft = {
lua = { "stylua" },
rust = { "rustfmt", require_cwd = true },
javascript = { "biome-check", "biome", "biome-organize-imports" },
typescript = { "biome-check", "biome", "biome-organize-imports" },
json = { "biome-check", "biome" },
yaml = { "biome-check" },
-- biome-check runs format + organize-imports + safe lint fixes in one pass
javascript = { "biome-check" },
typescript = { "biome-check" },
json = { "biome-check" },
solidity = { "forge_fmt" },
nix = { "nixfmt" },
toml = { "taplo" },
@@ -20,17 +20,12 @@ local options = {
},
},
format_after_save = function()
local buf_path = vim.api.nvim_buf_get_name(0)
if buf_path:find "/contrib/" then
return nil
end
return {
timeout_ms = 1000,
lsp_format = "fallback",
}
end,
-- No format-on-save: agents run these formatters themselves, and a save-time
-- reformat races their in-flight writes. Format on demand with <leader>fm.
default_format_opts = {
timeout_ms = 1000,
lsp_format = "fallback",
},
}
return options
+9 -27
View File
@@ -9,18 +9,11 @@ M.defaults = function()
vim.lsp.inlay_hint.enable()
-- lspconfig's own biome config already prefers the project-local binary, detects
-- monorepo roots per buffer, and only attaches where a biome config applies.
-- Formatting is the one thing overridden here: conform owns it.
vim.lsp.config("biome", {
cmd = {
-- prefer local binary if exists
vim.fn.filereadable "./node_modules/.bin/biome" == 1 and "./node_modules/.bin/biome" or "biome",
"lsp-proxy",
},
filetypes = { "javascript", "javascriptreact", "typescript", "typescriptreact", "json", "jsonc" },
root_dir = vim.fs.root(0, { "biome.json", "biome.jsonc", "biome.config.ts", "package.json", ".git" }),
settings = {}, -- add Biome-specific settings if needed
---@diagnostic disable-next-line: unused-local
on_attach = function(client, _bufnr)
-- disable formatting if you want Conform or another tool to handle formatting
on_attach = function(client)
client.server_capabilities.documentFormattingProvider = false
end,
})
@@ -30,23 +23,13 @@ M.defaults = function()
on_attach = M.on_attach,
on_init = nvlsp.on_init,
capabilities = nvlsp.capabilities,
inlay_hints = { enable = true },
})
vim.lsp.enable "lua_ls"
-- vim.lsp.config("wgsl_analyzer", {
-- on_attach = M.on_attach,
-- on_init = nvlsp.on_init,
-- capabilities = nvlsp.capabilities,
-- inlay_hints = { enable = true },
-- })
-- vim.lsp.enable "wgsl_analyzer"
vim.lsp.config("solidity_ls_nomicfoundation", {
on_attach = M.on_attach,
on_init = nvlsp.on_init,
capabilities = nvlsp.capabilities,
inlay_hints = { enable = true },
})
vim.lsp.enable "solidity_ls_nomicfoundation"
@@ -59,10 +42,11 @@ M.defaults = function()
[vim.diagnostic.severity.INFO] = "",
},
},
update_in_insert = true,
update_in_insert = false,
underline = true,
severity_sort = true,
virtual_text = false,
virtual_lines = { current_line = true },
float = {
focusable = false,
style = "minimal",
@@ -81,16 +65,14 @@ M.on_attach = function(client, bufnr)
return { buffer = bufnr, desc = "LSP " .. desc }
end
map("n", "<leader>rn", require "nvchad.lsp.renamer", opts "NvRenamer")
map("n", "gd", function()
require("telescope.builtin").lsp_definitions()
require("fzf-lua").lsp_definitions()
end, opts "LSP Definitions")
map("n", "gv", function()
require("telescope.builtin").lsp_definitions { jump_type = "vsplit" }
require("fzf-lua").lsp_definitions { jump1_action = require("fzf-lua").actions.file_vsplit }
end, opts "LSP Definitions (vertical split)")
map("n", "gr", function()
require("telescope.builtin").lsp_references()
require("fzf-lua").lsp_references()
end, opts "LSP References")
end
+29 -14
View File
@@ -2,27 +2,42 @@ require "nvchad.mappings"
local map = vim.keymap.set
-- remove nvim-tree mappings (using mini.files instead)
-- remove nvim-tree mappings (nvim-tree disabled; using yazi instead, see plugins/yazi.lua)
vim.keymap.del("n", "<leader>e")
vim.keymap.del("n", "<C-n>")
vim.keymap.del("n", "<leader>rn")
map("n", "<leader>rn", vim.lsp.buf.rename, { desc = "LSP Rename" })
-- mini.files
map("n", "<leader>e", function()
local MiniFiles = require "mini.files"
if not MiniFiles.close() then
MiniFiles.open(vim.api.nvim_buf_get_name(0))
end
end, { desc = "File explorer (current file)" })
-- NvChad binds these to telescope, which is not installed (fzf-lua is the picker).
-- Drop them all, then restore the ones fzf.lua does not already cover.
for _, lhs in ipairs {
"<leader>ff",
"<leader>fw",
"<leader>fb",
"<leader>fh",
"<leader>fo",
"<leader>fz",
"<leader>ma",
"<leader>cm",
"<leader>gt",
"<leader>pt",
} do
pcall(vim.keymap.del, "n", lhs)
end
map("n", "<leader>E", function()
local MiniFiles = require "mini.files"
if not MiniFiles.close() then
MiniFiles.open(vim.uv.cwd())
local function fzf(picker)
return function()
require("fzf-lua")[picker]()
end
end, { desc = "File explorer (cwd)" })
end
map("n", "<leader>fo", fzf "oldfiles", { desc = "Old files" })
map("n", "<leader>fh", fzf "helptags", { desc = "Help tags" })
map("n", "<leader>fz", fzf "blines", { desc = "Find in current buffer" })
map("n", "<leader>ma", fzf "marks", { desc = "Marks" })
map("n", "<leader>cm", fzf "git_commits", { desc = "Git commits" })
map("n", ";", ":", { desc = "CMD enter command mode" })
map("i", "jk", "<ESC>")
-- close current buffer
map("n", "<leader>q", ":q<cr>")
+3
View File
@@ -21,3 +21,6 @@ vim.g.neovide_scroll_animation_length = 0.15
vim.g.neovide_cursor_animation_length = 0.11
vim.o.swapfile = false
-- reload files edited on disk (e.g. by coding agents); see lua/autocmds.lua for the trigger
vim.o.autoread = true
-34
View File
@@ -6,39 +6,5 @@ return {
end,
},
{
"supermaven-inc/supermaven-nvim",
event = "VeryLazy",
config = function()
require("supermaven-nvim").setup {
keymaps = {
accept_suggestion = "<C-Enter>",
},
-- disable_inline_completion = true,
}
end,
},
{ "onsails/lspkind.nvim", event = "VeryLazy" },
-- {
-- "zbirenbaum/copilot.lua",
-- cmd = "Copilot",
-- event = "VeryLazy",
-- config = function()
-- require("copilot").setup({
-- suggestion = { enabled = false },
-- panel = { enabled = false },
-- })
-- end,
-- },
--
-- {
-- "zbirenbaum/copilot-cmp",
-- event = "VeryLazy",
-- dependencies = { "hrsh7th/cmp-nvim-lsp" },
-- config = function()
-- require("copilot_cmp").setup()
-- end,
-- },
}
-98
View File
@@ -1,98 +0,0 @@
return {
-- {
-- "m4xshen/hardtime.nvim",
-- lazy = false,
-- dependencies = { "MunifTanjim/nui.nvim", "nvim-lua/plenary.nvim" },
-- opts = {
-- disable_mouse = false,
-- restricted_keys = {
-- ["w"] = { "n", "x" },
-- ["W"] = { "n", "x" },
-- ["b"] = { "n", "x" },
-- ["B"] = { "n", "x" },
-- },
-- },
-- },
{
"smoka7/hop.nvim",
event = "VeryLazy",
version = "*",
opts = {
keys = "etovxqpdygfblzhckisuran",
},
keys = {
{
"ff",
function()
local dir = require("hop.hint").HintDirection
require("hop").hint_char1 { direction = dir.AFTER_CURSOR }
end,
desc = "go to char (forward)",
},
{
"FF",
function()
local dir = require("hop.hint").HintDirection
require("hop").hint_char1 { direction = dir.BEFORE_CURSOR }
end,
desc = "go to char (backward)",
},
{ "2ff", "<cmd>HopChar2<cr>", desc = "go to bigram" },
{ "<leader>fl", "<cmd>HopLineStart<cr>" },
{ "<leader>fp", "<cmd>HopPattern<cr>" },
{ "<leader>fw", "<cmd>HopWord<cr>" },
},
},
-- {
-- "kevinhwang91/nvim-ufo",
-- dependencies = { "kevinhwang91/promise-async" },
-- lazy = false,
-- config = function()
-- vim.o.foldcolumn = "1" -- '0' is not bad
-- vim.o.foldlevel = 99 -- Using ufo provider need a large value, feel free to decrease the value
-- vim.o.foldlevelstart = 99
-- vim.o.foldenable = true
--
-- local capabilities = vim.lsp.protocol.make_client_capabilities()
-- capabilities.textDocument.foldingRange = {
-- dynamicRegistration = false,
-- lineFoldingOnly = true,
-- }
-- local language_servers = vim.lsp.get_clients() -- or list servers manually like {'gopls', 'clangd'}
-- for _, ls in ipairs(language_servers) do
-- require("lspconfig")[ls].setup {
-- capabilities = capabilities,
-- -- you can add other fields for setting up lsp server in this table
-- }
-- end
-- require("ufo").setup()
-- end,
--
-- keys = {
-- {
-- "zR",
-- function()
-- require("ufo").openAllFolds()
-- end,
-- desc = "Open all folds",
-- },
-- {
-- "zM",
-- function()
-- require("ufo").closeAllFolds()
-- end,
-- desc = "Close all folds",
-- },
-- },
-- },
-- {
-- "tzachar/local-highlight.nvim",
-- event = "VeryLazy",
-- config = function()
-- require("local-highlight").setup()
-- end,
-- },
}
+1 -136
View File
@@ -1,142 +1,7 @@
return {
-- shipped by NvChad; disabled in favour of yazi (see plugins/yazi.lua)
{
"nvim-tree/nvim-tree.lua",
enabled = false,
},
{
"echasnovski/mini.files",
version = false,
keys = {
{
"<leader>e",
function()
local MiniFiles = require "mini.files"
if not MiniFiles.close() then
MiniFiles.open(vim.api.nvim_buf_get_name(0))
end
end,
desc = "File explorer (current file)",
},
{
"<leader>E",
function()
local MiniFiles = require "mini.files"
if not MiniFiles.close() then
MiniFiles.open(vim.uv.cwd())
end
end,
desc = "File explorer (cwd)",
},
},
config = function()
local mf = require "mini.files"
mf.setup {
mappings = {
close = "q",
go_in = "l",
go_in_plus = "<CR>",
go_out = "h",
go_out_plus = "H",
reset = "<BS>",
reveal_cwd = "@",
show_help = "g?",
synchronize = "=",
trim_left = "<",
trim_right = ">",
},
windows = {
preview = true,
width_focus = 30,
width_nofocus = 15,
width_preview = 50,
},
options = {
use_as_default_explorer = true,
},
}
-- https://github.com/nvim-mini/mini.nvim/discussions/2173
-- Window width based on the offset from the center, i.e. center window
-- is 60, then next over is 20, then the rest are 10.
-- Can use more resolution if you want like { 60, 20, 20, 10, 5 }
local widths = { 60, 20, 10 }
local ensure_center_layout = function(ev)
local state = mf.get_explorer_state()
if state == nil then
return
end
-- Compute "depth offset" - how many windows are between this and focused
local path_this = vim.api.nvim_buf_get_name(ev.data.buf_id):match "^minifiles://%d+/(.*)$"
local depth_this
for i, path in ipairs(state.branch) do
if path == path_this then
depth_this = i
end
end
if depth_this == nil then
return
end
local depth_offset = depth_this - state.depth_focus
-- Adjust config of this event's window
local i = math.abs(depth_offset) + 1
local win_config = vim.api.nvim_win_get_config(ev.data.win_id)
win_config.width = i <= #widths and widths[i] or widths[#widths]
win_config.col = math.floor(0.5 * (vim.o.columns - widths[1]))
for j = 1, math.abs(depth_offset) do
local sign = depth_offset == 0 and 0 or (depth_offset > 0 and 1 or -1)
-- widths[j+1] for the negative case because we don't want to add the center window's width
local prev_win_width = (sign == -1 and widths[j + 1]) or widths[j] or widths[#widths]
-- Add an extra +2 each step to account for the border width
win_config.col = win_config.col + sign * (prev_win_width + 2)
end
win_config.height = depth_offset == 0 and 25 or 20
win_config.row = math.floor(0.5 * (vim.o.lines - win_config.height))
win_config.border = { "🭽", "", "🭾", "", "🭿", "", "🭼", "" }
vim.api.nvim_win_set_config(ev.data.win_id, win_config)
end
vim.api.nvim_create_autocmd("User", { pattern = "MiniFilesWindowUpdate", callback = ensure_center_layout })
-- ability to open in splits
local map_split = function(buf_id, lhs, direction)
local rhs = function()
-- Make new window and set it as target
local cur_target = mf.get_explorer_state().target_window
local new_target = vim.api.nvim_win_call(cur_target, function()
vim.cmd(direction .. " split")
return vim.api.nvim_get_current_win()
end)
mf.set_target_window(new_target)
-- This intentionally doesn't act on file under cursor in favor of
-- explicit "go in" action (`l` / `L`). To immediately open file,
-- add appropriate `MiniFiles.go_in()` call instead of this comment.
mf.go_in()
mf.close()
end
-- Adding `desc` will result into `show_help` entries
local desc = "Split " .. direction
vim.keymap.set("n", lhs, rhs, { buffer = buf_id, desc = desc })
end
vim.api.nvim_create_autocmd("User", {
pattern = "MiniFilesBufferCreate",
callback = function(args)
local buf_id = args.data.buf_id
-- Tweak keys to your liking
map_split(buf_id, "s", "belowright horizontal")
map_split(buf_id, "v", "belowright vertical")
map_split(buf_id, "t", "tab")
end,
})
end,
},
}
-10
View File
@@ -1,10 +0,0 @@
return {
{
"windwp/nvim-spectre",
dependencies = { "nvim-lua/plenary.nvim" },
-- stylua: ignore
keys = {
{ "<leader>S", function() require("spectre").open() end, desc = "Replace in files (Spectre)", },
},
},
}
+15
View File
@@ -1,4 +1,11 @@
return {
-- shipped by NvChad; fzf-lua is the picker, and its telescope-based mappings
-- are replaced in lua/mappings.lua
{
"nvim-telescope/telescope.nvim",
enabled = false,
},
{
"ibhagwan/fzf-lua",
dependencies = { "nvim-tree/nvim-web-devicons" },
@@ -10,6 +17,14 @@ return {
cmd = "rg --hidden --files -g '!.git'",
},
grep = { multiline = true },
actions = {
files = {
["default"] = function(...) require("fzf-lua.actions").file_edit(...) end,
["ctrl-s"] = function(...) require("fzf-lua.actions").file_split(...) end,
["ctrl-v"] = function(...) require("fzf-lua.actions").file_vsplit(...) end,
["ctrl-t"] = function(...) require("fzf-lua.actions").file_tabedit(...) end,
},
},
},
cmd = "FzfLua",
keys = {
+34 -31
View File
@@ -4,12 +4,7 @@ return {
cmd = "Neogit",
dependencies = {
"nvim-lua/plenary.nvim", -- required
"sindrets/diffview.nvim", -- optional - Diff integration
-- Only one of these is needed.
"nvim-telescope/telescope.nvim", -- optional
"ibhagwan/fzf-lua", -- optional
-- "echasnovski/mini.pick", -- optional
"ibhagwan/fzf-lua", -- optional - picker
},
config = true,
keys = {
@@ -18,32 +13,40 @@ return {
},
{
"sindrets/diffview.nvim",
event = "VeryLazy",
dependencies = "nvim-lua/plenary.nvim",
opts = {
enhanced_diff_hl = true,
file_panel = {
win_config = {
width = 25,
},
},
},
"lewis6991/gitsigns.nvim",
opts = function(_, opts)
opts.on_attach = function(bufnr)
local gs = require "gitsigns"
local function map(mode, lhs, rhs, desc)
vim.keymap.set(mode, lhs, rhs, { buffer = bufnr, desc = "Gitsigns " .. desc })
end
-- ]c/[c belong to vim's builtin diff navigation while the window is in diff mode
map("n", "]c", function()
if vim.wo.diff then
vim.cmd.normal { "]c", bang = true }
else
gs.nav_hunk "next"
end
end, "next hunk")
map("n", "[c", function()
if vim.wo.diff then
vim.cmd.normal { "[c", bang = true }
else
gs.nav_hunk "prev"
end
end, "prev hunk")
map("n", "<leader>hp", gs.preview_hunk, "preview hunk")
map("n", "<leader>hb", gs.blame_line, "blame line")
map("n", "<leader>hd", gs.diffthis, "diff against index")
map({ "n", "v" }, "<leader>hr", gs.reset_hunk, "reset hunk")
end
return opts
end,
},
{ "akinsho/git-conflict.nvim", event = "VeryLazy", config = true },
{
"georgeguimaraes/review.nvim",
dependencies = {
"esmuellert/codediff.nvim",
"MunifTanjim/nui.nvim",
},
cmd = { "Review" },
keys = {
{ "<leader>r", "<cmd>Review<cr>", desc = "Review" },
{ "<leader>R", "<cmd>Review commits<cr>", desc = "Review commits" },
},
opts = {},
},
}
+1 -1
View File
@@ -1,7 +1,7 @@
return {
{
"stevearc/conform.nvim",
event = "BufWritePre",
cmd = "ConformInfo",
opts = require "configs.conform",
},
}
+8 -18
View File
@@ -1,12 +1,11 @@
local configs = require "configs.lspconfig"
vim.g.rustaceanvim = configs.rustacean
-- configs.lspconfig pulls in nvchad.configs.lspconfig, which does not exist until
-- NvChad is installed. Requiring it at spec-import time makes this whole file fail
-- on a cold clone, silently dropping every LSP plugin below from the first launch.
return {
{
"neovim/nvim-lspconfig",
config = function()
configs.defaults()
require("configs.lspconfig").defaults()
end,
},
@@ -14,6 +13,9 @@ return {
"mrcjkb/rustaceanvim",
version = "^6",
lazy = false,
init = function()
vim.g.rustaceanvim = require("configs.lspconfig").rustacean
end,
},
{
@@ -21,7 +23,7 @@ return {
ft = { "typescript", "typescriptreact" },
dependencies = { "nvim-lua/plenary.nvim", "neovim/nvim-lspconfig" },
config = function()
require("typescript-tools").setup(configs.typescript)
require("typescript-tools").setup(require("configs.lspconfig").typescript)
end,
},
@@ -55,16 +57,4 @@ return {
},
},
},
{
"luckasRanarison/tailwind-tools.nvim",
name = "tailwind-tools",
build = ":UpdateRemotePlugins",
dependencies = {
"nvim-treesitter/nvim-treesitter",
"nvim-telescope/telescope.nvim", -- optional
"neovim/nvim-lspconfig", -- optional
},
opts = {}, -- your configuration
},
}
+17
View File
@@ -0,0 +1,17 @@
return {
{
"m00qek/baleia.nvim",
version = "*",
config = function()
local baleia = require "baleia"
vim.api.nvim_create_autocmd("BufReadPost", {
pattern = "*",
callback = function()
if vim.bo.filetype == "sh" then
baleia.setup().once(vim.api.nvim_get_current_buf())
end
end,
})
end,
},
}
-17
View File
@@ -1,17 +0,0 @@
return {
{
"levouh/tint.nvim",
config = function()
require("tint").setup {
tint = -10,
tint_background_colors = true,
window_ignore_function = function(winid)
local bufid = vim.api.nvim_win_get_buf(winid)
local buftype = vim.api.nvim_get_option_value("buftype", { buf = bufid })
return buftype == "nofile"
end,
}
end,
},
}
+9 -1
View File
@@ -1,9 +1,12 @@
return {
{
"nvim-treesitter/nvim-treesitter",
-- Pin to archived `master` branch: this config uses the legacy
-- `nvim-treesitter.configs` API, which the `main` rewrite dropped.
branch = "master",
dependencies = {
"JoosepAlviste/nvim-ts-context-commentstring",
"nvim-treesitter/nvim-treesitter-textobjects",
{ "nvim-treesitter/nvim-treesitter-textobjects", branch = "master" },
},
config = function(_, opts)
require("nvim-treesitter.configs").setup(opts)
@@ -13,9 +16,14 @@ return {
"vim",
"lua",
"vimdoc",
"diff",
"gitcommit",
"html",
"css",
"c_sharp",
"cpp",
"kotlin",
"nix",
"rust",
"regex",
"javascript",
+13
View File
@@ -0,0 +1,13 @@
return {
{
"mikavilpas/yazi.nvim",
event = "VeryLazy",
keys = {
{ "<leader>y", "<cmd>Yazi<cr>", desc = "Open yazi at current file" },
{ "<leader>Y", "<cmd>Yazi cwd<cr>", desc = "Open yazi in cwd" },
},
opts = {
open_for_directories = false,
},
},
}