Coding Support
VimStar includes robust support for code development, powered by Mason, a package manager for LSP (Language Server Protocol) servers, DAP (Debug Adapter Protocol) servers, linters, and formatters.
VimStar installs several tools by default, but you can install whatever you want via Space-qm.
LSP Support (via Mason)
During the install, Mason installs these pre-configured LSPs:
| LSP | Language | Configuration |
|---|---|---|
lua_ls |
Lua | Diagnostics for vim globals enabled |
html |
HTML | Full support |
cssls |
CSS | Full support |
ts_ls |
TypeScript | Inlay hints enabled |
jdtls |
Java | Full support |
clangd |
C/C++ | -std=c11 fallback |
pylsp |
Python | pycodestyle, pyflakes, pylint enabled |
texlab |
LaTeX | Full support |
tinymist |
Typst | Full support |
ts_ls Configuration
TypeScript LSP has inlay hints enabled for parameter names, types, and return values.
pylsp Configuration
Python LSP has multiple linters enabled:
- pycodestyle
- pyflakes
- pylint
- mccabe
- rope_completion
Debugging (via DAP)
All debugging is configured via nvim-dap for Python, Go, and Java.
Pre-configured via nvim-dap-go:
Space-dt= Toggle breakpointSpace-dc= Continue
Python Debugging
Pytest (verbose):
- Open test file
- Use DAP configuration (via DAP UI or attach)
Debugpy path:
- Uses Mason’s debugpy.
- Or virtual environment if
VIRTUAL_ENVis set
Java Debugging
Attach to running process:
- Host:
127.0.0.1 - Port:
5005
Keymaps in Java files:
Space-df= Run test classSpace-dn= Run nearest method testSpace-oi= Organize imports
Setup:
- Run Java with debug agent:
java -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005. - Press
Space-dcto attach.
AI Assistant (CodeCompanion)
Pre-configured model: Ollama for local LLMs. Default model is qwen3.6:27b.
Keybindings
| Key | Action |
|---|---|
Space-cc |
Toggle AI chat |
Space-ci |
Inline AI edit |
Space-ca |
AI actions on selection |
Setup
- Install Ollama.
- Pull the model:
ollama pull qwen3.6:27b - Start Ollama daemon.
-
Increase the default context on the model by creating a
Modelfile:FROM qwen3.6:27b PARAMETER num_ctx [size]Depending on your RAM, use 32768 (32k), 65536 (64k), 131072 (128k), or 262144 (256k).
-
Create the model:
ollama create qwen3.6:27b-[size] -f ModelfileFor example,
ollama create qwen3.6:27b-256k -f Modelfile -
Edit
vimstar-user.luaand changevim.g.ollama_modelto your new, higher context model:vim.g.ollama_model = "qwen3.6:27b-256k" - Press
Space-ccto chat
Neocodeium (Alternative)
| Key | Action |
|---|---|
Space-cw |
Toggle Neocodeium |
LSP Keybindings (buffer-local)
When LSP attaches to a buffer, these keybindings become available:
| Key | Action |
|---|---|
K |
Show hover documentation |
gD |
Go to declaration |
gd |
Go to definition |
gi |
Go to implementation |
gR |
Show references |
ga |
Show code actions |
Code Formatting
Space-of = Format buffer (via LSP if available)
Indentation Rules
- Markdown: 2 spaces, expandtab
- Java: 4 spaces, no expandtab (via tabset.nvim)
- Everything Else: 4 spaces, expandtab
Language-Specific Configs
Java
Configure your JDK in vimstar-user.lua:
vim.g.java_sdk_path = "/path/to/your/jdk"
Gradle/Maven build scripts import Java projects. If you don’t have one, only basic syntax highlighting occurs.
TypeScript/JavaScript
Inlay hints enabled:
- Parameter names: all
- Parameter types: true
- Variable types: true
- Function return types: true
LSP Status
Check LSP status in lualine status bar (right side shows active clients).