From 81b85494df479856972eb3abe80695868c97bdd1 Mon Sep 17 00:00:00 2001 From: Jeremy Kaplan Date: Sat, 24 Oct 2026 12:15:47 -0400 Subject: [PATCH] coil: Replace simple-completion-language-server --- coil/config.toml | 59 ++++++++++++++++++++++++++++++++++ default.conf.yaml | 1 + helix/languages.toml | 11 +++++-- helix/snippets/go.toml | 8 ----- helix/snippets/javascript.toml | 14 -------- helix/snippets/zig.toml | 22 ------------- 6 files changed, 68 insertions(+), 47 deletions(-) create mode 100644 coil/config.toml delete mode 100644 helix/snippets/go.toml delete mode 100644 helix/snippets/javascript.toml delete mode 100644 helix/snippets/zig.toml diff --git a/coil/config.toml b/coil/config.toml new file mode 100644 index 0000000..ae9f7c2 --- /dev/null +++ b/coil/config.toml @@ -0,0 +1,59 @@ +# Rust + +[[snippets]] +language_ids = ['rust'] +pattern = 'drv' +text = '#[derive(Debug, Clone, PartialEq, $1)]' +label = '#[derive(...)]' + +[[snippets]] +language_ids = ['go'] +description = 't.Run(string, func(t *testing.T))' +pattern = 'trun' +text = ''' +t.Run("$1", func(t *testing.T) { + ${0:t.Fatal("TODO")} +}) +''' + +# Zig + +[[snippets]] +language_ids = ['zig'] +pattern = 'Struct' +text = ''' +const $1 = struct { + ${0} +}; +''' + +[[snippets]] +language_ids = ['zig'] +pattern = 'Enum' +text = ''' +const $1 = union(enum) { + ${0} +}; +''' + +[[snippets]] +language_ids = ['zig'] +pattern = 'dbg' +text = 'std.debug.print("$1\n", .{ $0 });' + +# JavaScript / JSX / TypeScript / TSX + +[[snippets]] +language_ids = ['javascript', 'javascriptreact', 'typescript', 'typescriptreact'] +pattern = 'clog' +text = 'console.log($0)' + +[[snippets]] +language_ids = ['javascript', 'javascriptreact', 'typescript', 'typescriptreact'] +pattern = 'cdeb' +text = 'console.debug($0)' + +[[snippets]] +language_ids = ['javascript', 'javascriptreact', 'typescript', 'typescriptreact'] +pattern = 'cerr' +text = 'console.error($0)' diff --git a/default.conf.yaml b/default.conf.yaml index 2f91c35..e2a7f07 100644 --- a/default.conf.yaml +++ b/default.conf.yaml @@ -12,6 +12,7 @@ ~/.cargo/config.toml: cargo/config.toml ~/.config/alacritty: alacritty/ ~/.config/bat: bat/ + ~/.config/coil: coil/ ~/.config/direnv/direnvrc: direnv/direnvrc ~/.config/dlv: dlv/ ~/.config/flake8: etc/flake8 diff --git a/helix/languages.toml b/helix/languages.toml index 8810ea3..3a7af06 100644 --- a/helix/languages.toml +++ b/helix/languages.toml @@ -2,7 +2,7 @@ name = "go" auto-format = true formatter = { command = "goimports" } -language-servers = [ "scls", "gopls", "golangci-lint-lsp" ] +language-servers = ["coil", "gopls", "golangci-lint-lsp"] [language-server.gopls.config.hints] assignVariableTypes = false @@ -12,6 +12,10 @@ functionTypeParameters = false parameterNames = false rangeVariableTypes = false +[[language]] +name = "rust" +language-servers = ["coil", "rust-analyzer"] + [language-server.rust-analyzer.config.check] command = "clippy" @@ -36,5 +40,6 @@ refresh = "onSave" name = "python" auto-format = true -[language-server.scls] -command = "simple-completion-language-server" +[language-server.coil] +command = "coil" +args = ["lsp"] diff --git a/helix/snippets/go.toml b/helix/snippets/go.toml deleted file mode 100644 index 45fcffa..0000000 --- a/helix/snippets/go.toml +++ /dev/null @@ -1,8 +0,0 @@ -[[snippets]] -prefix = 'trun' -description = 't.Run(string, func(t *testing.T))' -body = ''' -t.Run("$1", func(t *testing.T) { - ${0:t.Fatal("TODO")} -}) -''' diff --git a/helix/snippets/javascript.toml b/helix/snippets/javascript.toml deleted file mode 100644 index 82e8a6b..0000000 --- a/helix/snippets/javascript.toml +++ /dev/null @@ -1,14 +0,0 @@ -[[snippets]] -prefix = 'clog' -description = 'console.log(...)' -body = 'console.log($0)' - -[[snippets]] -prefix = 'cdeb' -description = 'console.debug(...)' -body = 'console.debug($0)' - -[[snippets]] -prefix = 'cerr' -description = 'console.error(...)' -body = 'console.error($0)' diff --git a/helix/snippets/zig.toml b/helix/snippets/zig.toml deleted file mode 100644 index 322a167..0000000 --- a/helix/snippets/zig.toml +++ /dev/null @@ -1,22 +0,0 @@ -[[snippets]] -prefix = 'Struct' -description = 'Struct declaration' -body = ''' -const $1 = struct { - ${0} -}; -''' - -[[snippets]] -prefix = 'Enum' -description = 'Enum declaration' -body = ''' -const $1 = union(enum) { - ${0} -}; -''' - -[[snippets]] -prefix = 'dbg' -description = 'Debug print' -body = 'std.debug.print("$1\n", .{ $0 });'