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.1
Open the Panel
Open the diagnostics panel with Show Diagnostics Panel or Toggle Diagnostics Panel from the command palette.
2
Navigate Issues
- Up/Down: Scroll the editor to preview each diagnostic’s location
- Enter: Jump to the diagnostic and focus the editor
- F8: Jump to next diagnostic without the panel
- Shift+F8: Jump to previous diagnostic
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: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:
1
Define the language
Add the language to the
languages section with file extensions:2
Configure the LSP server
Add the language server configuration to the
lsp section: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:
1
Open Settings
Use Edit → Settings… or the command palette (
Ctrl+P) and search for “Settings”2
Navigate to Languages
Go to the Languages section
3
Add or Edit a Language
Click on an existing language to edit it, or add a new one
4
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:
1
Open Settings
Open Settings (Edit → Settings…)
2
Configure bash language
Go to Languages → bash (or create a new
bash entry)3
Add filenames
Add filenames:
.bashrc, .zshrc, .bash_profile, .profile4
Set grammar
The grammar should be set to
Bourne Again Shell (bash) or similarThe
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.