# Installation
On OpenBSD, just install required pacjages:
pkg install neovim xclip
got clone ssh://anon@repo.vincentdelft.be/nvim
got checkout nvim.git
cd nvim
cp config/init.lua to ~/.config/nvim/
mkdir -p ~/.config/nvim/sessions/
# Configuration
start nvim and make sure lazy update all packages at 1st run
# Maintenance
regularely update modules by doing in nvim: `Lazy update`
# Documentation
This Neovim setup is designed for **Python development, shell scripting, HTML/CSS editing, and Markdown writing**.
It uses [lazy.nvim](https://github.com/folke/lazy.nvim) for plugin management and focuses on **LSP, autocompletion, Treesitter syntax highlighting, and session persistence**.
## Features
- đ **Lazy.nvim** â fast plugin manager
- đ **Python LSP** with `pylsp` + `pylint` integration
- đ **ShellCheck** for inline shell script linting
- đ **HTML/CSS/JS** improvements with Treesitter + autotagging
- đ **Markdown spell-check** for writing clean documentation
- đ¨ **Colors**: default scheme is `ron` (fallback `habamax`)
- đž **Sessions auto-save & restore** with `persistence.nvim`
- ⥠**Completion engine** (`nvim-cmp`) with snippets, paths, buffer, emoji
## Plugins
### Core Editing
- **`nvim-treesitter`** â Syntax highlighting & smart indentation (bash, python, html, css, javascript, lua)
- **`nvim-ts-autotag`** â Auto-close and rename paired HTML/JSX tags
- **`ccc.nvim`** â Inline color preview and color picker for CSS/HTML
### LSP & Autocompletion
- **`nvim-lspconfig`** â Manages language servers
- **`nvim-cmp`** + sources:
- LSP completions (`cmp-nvim-lsp`)
- Buffer words (`cmp-buffer`)
- Filesystem paths (`cmp-path`)
- Function signatures (`cmp-nvim-lsp-signature-help`)
- Emoji (`cmp-emoji`)
- **`LuaSnip`** â Snippet engine
### Linting & Spell Checking
- **`shellcheck.nvim`** â Lint shell scripts directly in Neovim
- **Spell-check** â Enabled for Markdown (`*.md`) files to avoid typos
### Sessions
- **`persistence.nvim`** â Save/restore sessions automatically in `~/.config/nvim/sessions/`
## Language Configuration
- **Python**
- LSP: [`pylsp`](https://github.com/python-lsp/python-lsp-server)
- `pylint` enabled (style warnings relaxed for line length & f-strings)
- Jedi completions
- **Shell**
- `shellcheck.nvim` integrated for on-the-fly linting
- **HTML/CSS/JS**
- 2-space indentation for HTML
- Treesitter-based highlighting
- Autotag for paired tags
- **Markdown**
- Spell-check enabled to catch typos
## Keybindings
Leader key: `<Space>`
### LSP
- `gd` â Go to definition
- `K` â Hover documentation
- `<leader>ca` â Code action
- `<leader>e` â Show diagnostics in float
- `<leader>q` â List diagnostics
### Sessions
- `<leader>ss` â Save session
- `<leader>sr` â Restore session
- `<leader>sl` â Restore last session
### Completion (`nvim-cmp`)
- `<C-b>` / `<C-f>` â Scroll docs
- `<C-Space>` â Trigger completion
- `<C-e>` â Abort completion
- `<CR>` â Confirm completion
## Diagnostics in Statusline
Shows inline diagnostic messages for the **current line**, with icons:
- â Error
- â ī¸ Warning
- âšī¸ Info
- đĄ Hint
## Clipboard Tips
For system clipboard integration (requires `xclip` on Linux/*BSD):
- In Visual mode:
- `"+y` â Yank to clipboard (paste with Ctrl+V)
- `"*y` â Yank to selection (paste with middle-click)
Examples:
```vim
:.,.+5yank * " yank 5 lines â paste with middle click
:.,.+5yank + " yank 5 lines â paste with Ctrl+V