on master help sign in
Add yet more language definitions.
89f81beBlaž Hrastnik
Cargo.lock+1
@@ -486,6 +486,7 @@ version = "0.1.0"
486dependencies = [
486dependencies = [
487 "anyhow",
487 "anyhow",
488 "helix-syntax",
488 "helix-syntax",
489+ "log",
489 "once_cell",
490 "once_cell",
490 "regex",
491 "regex",
491 "ropey",
492 "ropey",
TODO.md+16−3
@@ -3,6 +3,17 @@
3
3
4------
4------
5
5
6+- tree sitter:
7+ - lua
8+ - markdown
9+ - zig
10+ - regex
11+ - vue
12+ - kotlin
13+ - julia
14+ - clojure
15+ - erlang
16+
6- [ ] use signature_help_provider and completion_provider trigger characters in
17- [ ] use signature_help_provider and completion_provider trigger characters in
7 a hook to trigger signature help text / autocompletion
18 a hook to trigger signature help text / autocompletion
8- [ ] document_on_type provider triggers
19- [ ] document_on_type provider triggers
@@ -19,8 +30,8 @@
19- [ ] yank on delete
30- [ ] yank on delete
20- [ ] :x for closing buffers
31- [ ] :x for closing buffers
21
32
22−- [ ] jumplist (push selections on goto / select on the view)
33+- [x] jumplist (push selections on goto / select on the view)
23−- [ ] repeat insert/command -> transaction
34+- [x] repeat insert/command -> transaction
24- [ ] repeat selection
35- [ ] repeat selection
25
36
26- [] jump to alt buffer
37- [] jump to alt buffer
@@ -36,6 +47,9 @@
36- [ ] lsp: formatting
47- [ ] lsp: formatting
37- [x] lsp: goto
48- [x] lsp: goto
38
49
50+- [ ] search: wrap around file
51+- [ ] search: smart case by default: insensitive unless upper detected
52+
39- decide if markdown should have vertical padding too
53- decide if markdown should have vertical padding too
40
54
41- the hooks system should be better for pre/post insert.
55- the hooks system should be better for pre/post insert.
@@ -48,7 +62,6 @@
48- [ ] bracket pairs
62- [ ] bracket pairs
49- [x] comment block (gcc)
63- [x] comment block (gcc)
50- [ ] completion signature popups/docs
64- [ ] completion signature popups/docs
51−- [ ] multiple views into the same file
52- [ ] selection align
65- [ ] selection align
53- [ ] store some state between restarts: file positions, prompt history
66- [ ] store some state between restarts: file positions, prompt history
54- [ ] highlight matched characters in completion
67- [ ] highlight matched characters in completion
languages.toml+64
@@ -19,6 +19,26 @@ path = "../helix-syntax/languages/tree-sitter-toml"
19
19
20indent = { tab-width = 2, unit = " " }
20indent = { tab-width = 2, unit = " " }
21
21
22+[[language]]
23+name = "json"
24+scope = "source.json"
25+injection-regex = "json"
26+file-types = ["json"]
27+roots = []
28+path = "../helix-syntax/languages/tree-sitter-json"
29+
30+indent = { tab-width = 2, unit = " " }
31+
32+[[language]]
33+name = "c"
34+scope = "source.c"
35+injection-regex = "c"
36+file-types = ["c"] # TODO: ["h"]
37+roots = []
38+path = "../helix-syntax/languages/tree-sitter-c"
39+
40+indent = { tab-width = 2, unit = " " }
41+
22[[language]]
42[[language]]
23name = "cpp"
43name = "cpp"
24scope = "source.cpp"
44scope = "source.cpp"
@@ -29,6 +49,18 @@ path = "../helix-syntax/languages/tree-sitter-cpp" # TODO: also C highlights
29
49
30indent = { tab-width = 2, unit = " " }
50indent = { tab-width = 2, unit = " " }
31
51
52+[[language]]
53+name = "go"
54+scope = "source.go"
55+injection-regex = "go"
56+file-types = ["go"]
57+roots = ["Gopkg.toml", "go.mod"]
58+path = "../helix-syntax/languages/tree-sitter-go"
59+
60+language-server = { command = "gopls" }
61+# TODO: gopls needs utf-8 offsets
62+indent = { tab-width = 2, unit = " " }
63+
32[[language]]
64[[language]]
33name = "javascript"
65name = "javascript"
34scope = "source.js"
66scope = "source.js"
@@ -71,3 +103,35 @@ path = "../helix-syntax/languages/tree-sitter-python"
71language-server = { command = "pyls" }
103language-server = { command = "pyls" }
72# TODO: pyls needs utf-8 offsets
104# TODO: pyls needs utf-8 offsets
73indent = { tab-width = 2, unit = " " }
105indent = { tab-width = 2, unit = " " }
106+
107+[[language]]
108+name = "ruby"
109+scope = "source.ruby"
110+injection-regex = "ruby"
111+file-types = ["rb"]
112+roots = []
113+path = "../helix-syntax/languages/tree-sitter-ruby"
114+
115+language-server = { command = "solargraph", args = ["stdio"] }
116+indent = { tab-width = 2, unit = " " }
117+
118+[[language]]
119+name = "bash"
120+scope = "source.bash"
121+injection-regex = "bash"
122+file-types = ["sh", "bash"]
123+roots = []
124+path = "../helix-syntax/languages/tree-sitter-bash"
125+
126+language-server = { command = "bash-language-server", args = ["start"] }
127+indent = { tab-width = 2, unit = " " }
128+
129+[[language]]
130+name = "php"
131+scope = "source.php"
132+injection-regex = "php"
133+file-types = ["php"]
134+roots = []
135+path = "../helix-syntax/languages/tree-sitter-php"
136+
137+indent = { tab-width = 2, unit = " " }