on master help sign in
Add yet more language definitions.
commit89f81be31bf1a3bf0d4e80bc190b2193e89ff533 authorBlaž Hrastnik <blaz@mxxn.io> dateWed 7 Apr 2021, 14:04 (6 years ago) parentfb792c5
3 files changed+81−3
Cargo.lock+1 TODO.md+16−3 languages.toml+64
Cargo.lock+1
@@ -486,6 +486,7 @@ version = "0.1.0"
486486dependencies = [
487487 "anyhow",
488488 "helix-syntax",
489+ "log",
489490 "once_cell",
490491 "regex",
491492 "ropey",
TODO.md+16−3
@@ -3,6 +3,17 @@
33
44------
55
6+- tree sitter:
7+ - lua
8+ - markdown
9+ - zig
10+ - regex
11+ - vue
12+ - kotlin
13+ - julia
14+ - clojure
15+ - erlang
16+
617- [ ] use signature_help_provider and completion_provider trigger characters in
718 a hook to trigger signature help text / autocompletion
819- [ ] document_on_type provider triggers
@@ -19,8 +30,8 @@
1930- [ ] yank on delete
2031- [ ] :x for closing buffers
2132
22−- [ ] jumplist (push selections on goto / select on the view)
23−- [ ] repeat insert/command -> transaction
33+- [x] jumplist (push selections on goto / select on the view)
34+- [x] repeat insert/command -> transaction
2435- [ ] repeat selection
2536
2637- [] jump to alt buffer
@@ -36,6 +47,9 @@
3647- [ ] lsp: formatting
3748- [x] lsp: goto
3849
50+- [ ] search: wrap around file
51+- [ ] search: smart case by default: insensitive unless upper detected
52+
3953- decide if markdown should have vertical padding too
4054
4155- the hooks system should be better for pre/post insert.
@@ -48,7 +62,6 @@
4862- [ ] bracket pairs
4963- [x] comment block (gcc)
5064- [ ] completion signature popups/docs
51−- [ ] multiple views into the same file
5265- [ ] selection align
5366- [ ] store some state between restarts: file positions, prompt history
5467- [ ] highlight matched characters in completion
languages.toml+64
@@ -19,6 +19,26 @@ path = "../helix-syntax/languages/tree-sitter-toml"
1919
2020indent = { tab-width = 2, unit = " " }
2121
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+
2242[[language]]
2343name = "cpp"
2444scope = "source.cpp"
@@ -29,6 +49,18 @@ path = "../helix-syntax/languages/tree-sitter-cpp" # TODO: also C highlights
2949
3050indent = { tab-width = 2, unit = " " }
3151
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+
3264[[language]]
3365name = "javascript"
3466scope = "source.js"
@@ -71,3 +103,35 @@ path = "../helix-syntax/languages/tree-sitter-python"
71103language-server = { command = "pyls" }
72104# TODO: pyls needs utf-8 offsets
73105indent = { 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 = " " }