helix: Add snippets
This commit is contained in:
parent
03c3ebbc2f
commit
92b481038d
4 changed files with 48 additions and 0 deletions
|
|
@ -2,6 +2,7 @@
|
|||
name = "go"
|
||||
auto-format = true
|
||||
formatter = { command = "goimports" }
|
||||
language-servers = [ "scls", "gopls", "golangci-lint-lsp" ]
|
||||
|
||||
[language-server.gopls.config.hints]
|
||||
assignVariableTypes = false
|
||||
|
|
@ -31,3 +32,6 @@ refresh = "onSave"
|
|||
[[language]]
|
||||
name = "python"
|
||||
auto-format = true
|
||||
|
||||
[language-server.scls]
|
||||
command = "simple-completion-language-server"
|
||||
|
|
|
|||
8
helix/snippets/go.toml
Normal file
8
helix/snippets/go.toml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
[[snippets]]
|
||||
prefix = 'trun'
|
||||
description = 't.Run(string, func(t *testing.T))'
|
||||
body = '''
|
||||
t.Run("$1", func(t *testing.T) {
|
||||
${0:t.Fatal("TODO")}
|
||||
})
|
||||
'''
|
||||
14
helix/snippets/javascript.toml
Normal file
14
helix/snippets/javascript.toml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
[[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)'
|
||||
22
helix/snippets/zig.toml
Normal file
22
helix/snippets/zig.toml
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
[[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