LSP configuration¶
The [lsp]
configuration file section provides settings to
fine-tune the LSP editors integration.
Completion¶
Customize how completion items appear in your editor when auto-completing links
with the [lsp.completion]
sub-section.
Setting |
Type |
Description |
---|---|---|
|
|
Label displayed in the completion pop-up for each note |
|
|
Text used as a source when filtering the completion pop-up with keystrokes |
|
|
Additional information about a completion item |
|
|
Indicates whether |
Each key accepts a template with the following context:
Variable |
Type |
Description |
---|---|---|
|
string |
Filename of the note, including its extension |
|
string |
Filename of the note without the file extension |
|
string |
File path to the note, relative to the notebook root |
|
string |
Absolute file path to the note |
|
string |
File path to the note, relative to the current directory |
|
string |
Note title |
|
string |
Note title or path if empty |
|
map |
YAML frontmatter metadata, e.g. |
YAML keys are normalized to lower case.
Diagnostics¶
Use the [lsp.diagnostics]
sub-section to configure how LSP diagnostics are
reported to your editors. Each diagnostic setting can be:
An empty string or
none
to ignore this diagnostic.hint
,info
,warning
orerror
to enable and set the severity of the diagnostic.
Setting |
Default |
Description |
---|---|---|
|
|
Report titles of wiki-links, which is useful if you use IDs for filenames |
|
|
Warn for dead links between notes |
Complete example¶
[lsp]
[lsp.diagnostics]
# Report titles of wiki-links as hints.
wiki-title = "hint"
# Warn for dead links between notes.
dead-link = "error"
[lsp.completion]
# Show the note title in the completion pop-up, or fallback on its path if empty.
note-label = "{{title-or-path}}"
# Filter out the completion pop-up using the note title or its path.
note-filter-text = "{{title}} {{path}}"
# Show the note filename without extension as detail.
note-detail = "{{filename-stem}}"