coil: Replace simple-completion-language-server
This commit is contained in:
parent
23083ad4c9
commit
81b85494df
6 changed files with 68 additions and 47 deletions
59
coil/config.toml
Normal file
59
coil/config.toml
Normal file
|
|
@ -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)'
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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"]
|
||||
|
|
|
|||
|
|
@ -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")}
|
||||
})
|
||||
'''
|
||||
|
|
@ -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)'
|
||||
|
|
@ -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 });'
|
||||
Loading…
Reference in a new issue