Core Features
Fresh’s LSP integration provides:Real-time Diagnostics
See errors and warnings in your code as you type
Code Completion
Get intelligent code completion suggestions
Go-to-Definition
Quickly jump to the definition of a symbol
Diagnostics Panel
The diagnostics panel provides a centralized view of all errors and warnings in your code.Open the Panel
Open the diagnostics panel with Show Diagnostics Panel or Toggle Diagnostics Panel from the command palette.
Code Folding
When the LSP server providesfoldingRange, fold indicators appear in the gutter. See Editing — Code Folding for more details.
Built-in LSP Support
Fresh includes built-in LSP configurations for many languages. Simply install the server and Fresh will use it automatically:| Language | LSP Server | Install Command |
|---|---|---|
| Rust | rust-analyzer | rustup component add rust-analyzer |
| Go | gopls | go install golang.org/x/tools/gopls@latest |
| TypeScript/JavaScript | typescript-language-server | npm install -g typescript-language-server typescript |
| Python | pylsp | pip install python-lsp-server |
| Java | jdtls | brew install jdtls |
| Zig | zls | brew install zls |
| LaTeX | texlab | brew install texlab |
| Markdown | marksman | brew install marksman |
| C/C++ | clangd | brew install llvm |
Python LSP Configuration
The default Python server ispylsp. Fresh also supports several alternative Python language servers:
- pyright
- basedpyright
- pylsp with plugins
Recommended for type checking with strong TypeScript-like type analysis.
Install:
npm install -g pyright or pip install pyrightConfiguring LSP for a New Language
To add LSP support for a language, configure two sections in your~/.config/fresh/config.json:
The language name (e.g.,
"csharp") must match in both sections. Fresh includes built-in language definitions for Rust, JavaScript, TypeScript, and Python.Configuring Language Detection via Settings UI
You can also configure language detection using the Settings UI instead of editingconfig.json directly:
Configure Detection
Set the following fields:
- Extensions: File extensions that should use this language (e.g.,
csfor C#,rsfor Rust) - Filenames: Specific filenames without extensions (e.g.,
Makefile,.bashrc,.zshrc) - Grammar: The syntax highlighting grammar to use (must match a grammar name from syntect)
Example: Adding Shell Script Detection for Dotfiles
To make Fresh recognize.bashrc, .zshrc, and similar files as shell scripts:
The
filenames field supports glob patterns like *.conf, *rc, or /etc/**/rc.* for matching files without standard extensions. Fresh checks filenames first, then extensions, allowing dotfiles without traditional extensions to get proper syntax highlighting.