mirror of
https://github.com/itme-brain/nvim.git
synced 2026-05-08 07:00:13 -04:00
fixed
This commit is contained in:
parent
23fb66df0b
commit
0270d78072
4 changed files with 22 additions and 10 deletions
10
README.md
10
README.md
|
|
@ -1,6 +1,6 @@
|
||||||
# Neovim Configuration
|
# Neovim Configuration
|
||||||
|
|
||||||
Portable Neovim configuration using lazy.nvim and native LSP (Neovim 0.11+).
|
Portable Neovim configuration using lazy.nvim and native LSP (Neovim 0.11+, tested on 0.12.1).
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
|
|
@ -16,8 +16,9 @@ git clone --recurse-submodules git@github.com:itme-brain/nixos.git
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
- **Native LSP** (`vim.lsp.config`) - no manual server list needed
|
- **Native LSP** (`vim.lsp.config` / `vim.lsp.enable`) - no manual server list needed
|
||||||
- **Smart LSP picker** (`<leader>css`) - auto-detects installed servers for current filetype
|
- **Smart LSP picker** (`<leader>css`) - auto-detects installed servers for current filetype
|
||||||
|
- **Neovim 0.12 compatible** - uses built-in `:lsp` commands and keeps legacy `:Lsp*` aliases working
|
||||||
- **Portable** - works on NixOS (LSPs via extraPackages) or any system (LSPs via Mason)
|
- **Portable** - works on NixOS (LSPs via extraPackages) or any system (LSPs via Mason)
|
||||||
- **Mason** - auto-disabled on NixOS, auto-installs essentials elsewhere
|
- **Mason** - auto-disabled on NixOS, auto-installs essentials elsewhere
|
||||||
|
|
||||||
|
|
@ -39,6 +40,7 @@ On other systems, Mason auto-installs:
|
||||||
- `yamlls` - YAML
|
- `yamlls` - YAML
|
||||||
|
|
||||||
The smart picker (`<leader>css`) scans all lspconfig servers and shows only those with binaries installed.
|
The smart picker (`<leader>css`) scans all lspconfig servers and shows only those with binaries installed.
|
||||||
|
On Neovim 0.12+, start/stop/restart uses the built-in `:lsp` commands under the hood.
|
||||||
|
|
||||||
## Key Bindings
|
## Key Bindings
|
||||||
|
|
||||||
|
|
@ -54,8 +56,8 @@ The smart picker (`<leader>css`) scans all lspconfig servers and shows only thos
|
||||||
| `<leader>gr` | Find references |
|
| `<leader>gr` | Find references |
|
||||||
| `<leader>e` | Toggle file explorer |
|
| `<leader>e` | Toggle file explorer |
|
||||||
| `<leader>bd` | Delete buffer |
|
| `<leader>bd` | Delete buffer |
|
||||||
| `<leader>/` | Live grep |
|
| `<leader>/` | Live grep from git root |
|
||||||
| `<leader>ff` | Find files |
|
| `<leader>ff` | Find files from git root |
|
||||||
|
|
||||||
## Plugins
|
## Plugins
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,9 @@ return {
|
||||||
GitGutterChange = { bg = "NONE" },
|
GitGutterChange = { bg = "NONE" },
|
||||||
GitGutterAdd = { bg = "NONE" },
|
GitGutterAdd = { bg = "NONE" },
|
||||||
GitGutterDelete = { bg = "NONE" },
|
GitGutterDelete = { bg = "NONE" },
|
||||||
|
GitSignsAddNr = { bg = "NONE", fg = "#98c379" },
|
||||||
|
GitSignsChangeNr = { bg = "NONE", fg = "#61afef" },
|
||||||
|
GitSignsDeleteNr = { bg = "NONE", fg = "#e06c75" },
|
||||||
SignColumn = { bg = "NONE" },
|
SignColumn = { bg = "NONE" },
|
||||||
TelescopeSelection = { bg = "Gray", fg = "Green", bold = true },
|
TelescopeSelection = { bg = "Gray", fg = "Green", bold = true },
|
||||||
TelescopePreviewMatch = { bg = "Yellow", fg = "Black" },
|
TelescopePreviewMatch = { bg = "Yellow", fg = "Black" },
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,17 @@ return {
|
||||||
{
|
{
|
||||||
"lukas-reineke/indent-blankline.nvim",
|
"lukas-reineke/indent-blankline.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
|
local hooks = require("ibl.hooks")
|
||||||
|
|
||||||
|
hooks.register(hooks.type.HIGHLIGHT_SETUP, function()
|
||||||
|
vim.api.nvim_set_hl(0, "IblIndent", { link = "Comment" })
|
||||||
|
end)
|
||||||
|
|
||||||
require("ibl").setup({
|
require("ibl").setup({
|
||||||
--indent = { char = "│" },
|
indent = {
|
||||||
--indent = { char = "⎸" },
|
char = "|",
|
||||||
indent = { char = "┆" },
|
highlight = "IblIndent",
|
||||||
|
},
|
||||||
scope = {
|
scope = {
|
||||||
enabled = false
|
enabled = false
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -41,15 +41,15 @@ return {
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Set up cursorline highlight for neo-tree (green text on dark bg)
|
-- Keep the selected entry readable without a solid row background.
|
||||||
vim.api.nvim_set_hl(0, "NeoTreeCursorLine", { bg = "#313244", fg = "#a6e3a1" })
|
vim.api.nvim_set_hl(0, "NeoTreeCursorLine", { bg = "NONE", fg = "#a6e3a1" })
|
||||||
|
|
||||||
-- Apply highlight and re-apply on colorscheme change
|
-- Apply highlight and re-apply on colorscheme change
|
||||||
vim.api.nvim_create_autocmd({ "FileType", "ColorScheme" }, {
|
vim.api.nvim_create_autocmd({ "FileType", "ColorScheme" }, {
|
||||||
pattern = { "neo-tree", "*" },
|
pattern = { "neo-tree", "*" },
|
||||||
callback = function(ev)
|
callback = function(ev)
|
||||||
if ev.event == "ColorScheme" then
|
if ev.event == "ColorScheme" then
|
||||||
vim.api.nvim_set_hl(0, "NeoTreeCursorLine", { bg = "#313244", fg = "#a6e3a1" })
|
vim.api.nvim_set_hl(0, "NeoTreeCursorLine", { bg = "NONE", fg = "#a6e3a1" })
|
||||||
end
|
end
|
||||||
local win = vim.api.nvim_get_current_win()
|
local win = vim.api.nvim_get_current_win()
|
||||||
local buf = vim.api.nvim_win_get_buf(win)
|
local buf = vim.api.nvim_win_get_buf(win)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue