diff options
| author | Paul Buetow <paul@buetow.org> | 2025-08-16 16:38:11 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-08-16 16:38:11 +0300 |
| commit | ad62a3eb132924858d23694273923f1fc13ca22e (patch) | |
| tree | caadd2832a8c8a2eb3400aa12747eedd97a7d9a1 | |
| parent | 833bb66706dd991ecd3973da360c472d818e970a (diff) | |
revert: remove newline-after-colon insertion behavior and its tests
| -rw-r--r-- | IDEAS.md | 24 | ||||
| -rw-r--r-- | internal/lsp/handlers.go | 2 | ||||
| -rw-r--r-- | internal/lsp/handlers_test.go | 2 |
3 files changed, 26 insertions, 2 deletions
@@ -38,4 +38,26 @@ Be able to switch LLMs. ## More -* [ ] Useful: https://deepwiki.com/helix-editor/helix/4.3-language-server-protocol +* [ ] Useful: https://deepwiki.com/helix-editor/helix/4.3-language-server-protocol` + +## Internal usage notes + +Helix' `languages.toml` + +```toml +[[language]] +name = "go" +auto-format= true +diagnostic-severity = "hint" +formatter = { command = "goimports" } +language-servers = [ "gopls", "golangci-lint-lsp", "hexai" ] +# language-servers = [ "gopls", "golangci-lint-lsp", "lsp-ai", "gpt", "hexai" ] + +[language-server.hexai] +command = "hexai" +` + + +### Write a new function prompt + +// Implement a function counting the number of files in a directory <<==prompt diff --git a/internal/lsp/handlers.go b/internal/lsp/handlers.go index 1e77141..d58227c 100644 --- a/internal/lsp/handlers.go +++ b/internal/lsp/handlers.go @@ -155,7 +155,7 @@ func (s *Server) tryLLMCompletion(p CompletionParams, above, current, below, fun return nil, false } - te, filter := computeTextEditAndFilter(cleaned, inParams, current, p) + te, filter := computeTextEditAndFilter(cleaned, inParams, current, p) label := labelForCompletion(cleaned, filter) items := []CompletionItem{{ Label: label, diff --git a/internal/lsp/handlers_test.go b/internal/lsp/handlers_test.go index bde9b82..ecd9de6 100644 --- a/internal/lsp/handlers_test.go +++ b/internal/lsp/handlers_test.go @@ -124,3 +124,5 @@ func TestComputeTextEditAndFilter_NoParensFallback(t *testing.T) { // small helper to avoid importing strings func contains(s, sub string) bool { return len(s) >= len(sub) && (func() bool { i := 0; for i+len(sub) <= len(s) { if s[i:i+len(sub)] == sub { return true }; i++ }; return false })() } + + |
