fix: default lsp config opts not being rendered (#433)

The handlebar templates for lsp completion popovers, were not being escaped.
Therefore they were not being rendered in final config generation.
pull/430/head
Tillman Jex 2 months ago committed by GitHub
parent 53df87974c
commit 6134873a5a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -5,9 +5,9 @@ import (
"path/filepath"
"strings"
toml "github.com/pelletier/go-toml"
"github.com/zk-org/zk/internal/util/errors"
"github.com/zk-org/zk/internal/util/opt"
toml "github.com/pelletier/go-toml"
)
// Config holds the user configuration.
@ -23,6 +23,10 @@ type Config struct {
Extra map[string]string
}
// NOTE: config generation occurs in core.Init. The below function is used
// for test cases and as a program level default if the user conf is missing or
// has values missing.
// NewDefaultConfig creates a new Config with the default settings.
func NewDefaultConfig() Config {
return Config{

@ -332,11 +332,11 @@ dead-link = "error"
# Customize the completion pop-up of your LSP client.
# Show the note title in the completion pop-up, or fallback on its path if empty.
#note-label = "{{title-or-path}}"
#note-label = "\{{title-or-path}}"
# Filter out the completion pop-up using the note title or its path.
#note-filter-text = "{{title}} {{path}}"
#note-filter-text = "\{{title}} \{{path}}"
# Show the note filename without extension as detail.
#note-detail = "{{filename-stem}}"
#note-detail = "\{{filename-stem}}"
# NAMED FILTERS

@ -142,11 +142,11 @@ $ cat .zk/config.toml
># Customize the completion pop-up of your LSP client.
>
># Show the note title in the completion pop-up, or fallback on its path if empty.
>#note-label = ""
>#note-label = "\{{title-or-path}}"
># Filter out the completion pop-up using the note title or its path.
>#note-filter-text = " "
>#note-filter-text = "\{{title}} \{{path}}"
># Show the note filename without extension as detail.
>#note-detail = ""
>#note-detail = "\{{filename-stem}}"
>
>
># NAMED FILTERS

Loading…
Cancel
Save