mirror of
https://github.com/itme-brain/nvim.git
synced 2026-03-23 17:39:43 -04:00
Add README and sync mason_ensure_installed with NixOS extraPackages
This commit is contained in:
parent
2da1c91264
commit
c8e56a1859
2 changed files with 68 additions and 1 deletions
62
README.md
Normal file
62
README.md
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
# Neovim Configuration
|
||||
|
||||
Portable Neovim configuration using lazy.nvim and native LSP (Neovim 0.11+).
|
||||
|
||||
## Installation
|
||||
|
||||
### Standalone (any system)
|
||||
```bash
|
||||
git clone git@github.com:itme-brain/nvim.git ~/.config/nvim
|
||||
```
|
||||
|
||||
### As part of NixOS config
|
||||
```bash
|
||||
git clone --recurse-submodules git@github.com:itme-brain/nixos.git
|
||||
```
|
||||
|
||||
## Features
|
||||
|
||||
- **Native LSP** (`vim.lsp.config`) - no manual server list needed
|
||||
- **Smart LSP picker** (`<leader>css`) - auto-detects installed servers for current filetype
|
||||
- **Portable** - works on NixOS (LSPs via extraPackages) or any system (LSPs via Mason)
|
||||
- **Mason** - auto-disabled on NixOS, auto-installs essentials elsewhere
|
||||
|
||||
## LSP Setup
|
||||
|
||||
On NixOS, LSPs come from:
|
||||
- `neovim.extraPackages` (global essentials)
|
||||
- Project `devShell` (project-specific)
|
||||
|
||||
On other systems, Mason installs: `lua_ls`, `bashls`, `jsonls`
|
||||
|
||||
The smart picker (`<leader>css`) scans all lspconfig servers and shows only those with binaries installed.
|
||||
|
||||
## Key Bindings
|
||||
|
||||
| Key | Action |
|
||||
|-----|--------|
|
||||
| `<leader>css` | Start LSP (smart picker) |
|
||||
| `<leader>csx` | Stop LSP |
|
||||
| `<leader>csr` | Restart LSP |
|
||||
| `<leader>cf` | Format code |
|
||||
| `<leader>ca` | Code action |
|
||||
| `<leader>cr` | Rename symbol |
|
||||
| `gd` | Go to definition |
|
||||
| `<leader>gr` | Find references |
|
||||
| `<leader>e` | Toggle file explorer |
|
||||
| `<leader>bd` | Delete buffer |
|
||||
| `<leader>/` | Live grep |
|
||||
| `<leader>ff` | Find files |
|
||||
|
||||
## Plugins
|
||||
|
||||
- **lazy.nvim** - plugin manager
|
||||
- **nvim-lspconfig** - LSP configurations
|
||||
- **nvim-cmp** - completion
|
||||
- **telescope.nvim** - fuzzy finder
|
||||
- **nvim-treesitter** - syntax highlighting
|
||||
- **neo-tree.nvim** - file explorer
|
||||
- **gitsigns.nvim** - git integration
|
||||
- **lualine.nvim** - statusline
|
||||
- **bufferline.nvim** - buffer tabs
|
||||
- **which-key.nvim** - keybinding hints
|
||||
|
|
@ -8,9 +8,14 @@ local is_nixos = vim.fn.filereadable("/etc/NIXOS") == 1
|
|||
-- On NixOS, install these via extraPackages or per-project devShells
|
||||
local mason_ensure_installed = {
|
||||
"lua_ls", -- Neovim config
|
||||
"nil_ls", -- Nix
|
||||
"nil_ls", -- Nix (nixd not available in Mason)
|
||||
"bashls", -- Shell scripts
|
||||
"jsonls", -- JSON configs
|
||||
"html", -- HTML
|
||||
"cssls", -- CSS
|
||||
"marksman", -- Markdown
|
||||
"taplo", -- TOML
|
||||
"yamlls", -- YAML
|
||||
}
|
||||
|
||||
return {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue