Compare commits

...

2 Commits

Author SHA1 Message Date
Norman Köhring 72f5be9e00 update helix config 4 months ago
Norman Köhring c819009a0c update helix config 4 months ago

@ -10,8 +10,16 @@ Language Servers to install to get the config to work as is:
```sh ```sh
cargo install --git https://github.com/estin/simple-completion-language-server.git cargo install --git https://github.com/estin/simple-completion-language-server.git
# after setting up the helix config, run:
simple-completion-language-server fetch-external-snippets
# and optionally validate the snippets with
simple-completion-language-server validate-snippets
simple-completion-language-server validate-unicode-input
``` ```
This LS uses snippets and mappings for completions. My config uses the suggested [friendly-snippets](https://github.com/rafamadriz/friendly-snippets/) and [vim-unicode-snippets](https://github.com/danielwe/vim-unicode-snippets/blob/master/snippets/_.snippets).
### Web development ### Web development
Vuejs, Typescript, Javascript, HTML, CSS Vuejs, Typescript, Javascript, HTML, CSS

@ -19,14 +19,19 @@ render = true
character = "▏" # Some characters that work well: "▏", "┆", "┊", "⸽" character = "▏" # Some characters that work well: "▏", "┆", "┊", "⸽"
skip-levels = 1 skip-levels = 1
[editor.whitespace] [editor.whitespace.render]
render = "all" space = "all"
tab = "all"
nbsp = "all"
nnbsp = "all"
newline = "all"
[editor.whitespace.characters] [editor.whitespace.characters]
space = "·" space = "·"
nbsp = "⍽" nbsp = "⍽"
tab = "→" nnbsp = "␣"
newline = "¬" #"⏎" tab = "⇥" # "→"
newline = "⮒" # "¬" #"⏎"
tabpad = "·" # Tabs will look like "→···" (depending on tab width) tabpad = "·" # Tabs will look like "→···" (depending on tab width)
[editor.lsp] [editor.lsp]

@ -0,0 +1,64 @@
[[sources]]
name = "friendly-snippets"
git = "https://github.com/rafamadriz/friendly-snippets.git"
[[sources.paths]]
scope = ["shell"]
path = "snippets/shell/shell.json"
[[sources.paths]]
scope = ["rust"]
path = "snippets/rust/rust.json"
[[sources.paths]]
scope = ["ruby"]
path = "snippets/ruby/ruby.json"
[[sources.paths]]
scope = ["ruby"]
path = "snippets/frameworks/rails.json"
[[sources.paths]]
scope = ["python"]
path = "snippets/python/python.json"
[[sources.paths]]
scope = ["php"]
path = "snippets/php/php.json"
[[sources.paths]]
scope = ["latex"]
path = "snippets/latex/latex-snippets.json"
[[sources.paths]]
scope = ["javascript"]
path = "snippets/javascript/javascript.json"
[[sources.paths]]
scope = ["javascript"]
path = "snippets/javascript/jsdoc.json"
[[sources.paths]]
scope = ["typescript"]
path = "snippets/javascript/typescript.json"
[[sources.paths]]
scope = ["typescript"]
path = "snippets/javascript/tsdoc.json"
[[sources.paths]]
scope = ["docker"]
path = "snippets/docker/docker-compose.json"
[[sources.paths]]
scope = ["docker"]
path = "snippets/docker/docker_file.json"
[[sources.paths]]
scope = ["vue"]
path = "snippets/frameworks/vue/vue.json"
[[sources.paths]]
scope = ["vue"]
path = "snippets/frameworks/vue/html.json"
[[sources.paths]]
scope = ["vue"]
path = "snippets/frameworks/vue/script.json"
[[sources.paths]]
scope = ["vue"]
path = "snippets/frameworks/vue/style.json"

@ -1,2 +0,0 @@
#!/bin/sh
npm i -g typescript typescript-language-server vscode-langservers-extracted emmet-ls @vue/language-server yaml-language-server

@ -20,6 +20,7 @@ run = "onType"
validate = "on" validate = "on"
experimental = {} experimental = {}
problems = { shortenToSingleLine = false } problems = { shortenToSingleLine = false }
provideFormatter = true
[language-server.eslint.config.codeAction] [language-server.eslint.config.codeAction]
disableRuleComment = { enable = true, location = "separateLine" } disableRuleComment = { enable = true, location = "separateLine" }
@ -68,12 +69,12 @@ feature_paths = true # enable path completion
[[language]] [[language]]
name = "typescript" name = "typescript"
auto-format = true auto-format = true
language-servers = [ "scls", "typescript-language-server", "eslint", "emmet-ls", "gpt" ] language-servers = [ "typescript-language-server", "eslint", "emmet-ls", "scls", "gpt" ]
formatter = { command = "prettier", args = [ "--parser", "typescript" ] } formatter = { command = "prettier", args = [ "--parser", "typescript" ] }
[[language]] [[language]]
name = "javascript" name = "javascript"
language-servers = [ "scls", "typescript-language-server", "eslint", "emmet-ls", "gpt" ] language-servers = [ "typescript-language-server", "eslint", "emmet-ls", "scls", "gpt" ]
formatter = { command = "prettier", args = [ "--parser", "typescript" ] } formatter = { command = "prettier", args = [ "--parser", "typescript" ] }
auto-format = true auto-format = true
@ -84,7 +85,7 @@ auto-format = true
[[language]] [[language]]
name = "html" name = "html"
language-servers = [ "scls", "vscode-html-language-server", "emmet-ls", "gpt" ] language-servers = [ "vscode-html-language-server", "emmet-ls", "scls", "gpt" ]
formatter = { command = 'prettier', args = ["--parser", "html"] } formatter = { command = 'prettier', args = ["--parser", "html"] }
auto-format = true auto-format = true
[language.auto-pairs] [language.auto-pairs]
@ -98,7 +99,7 @@ auto-format = true
[[language]] [[language]]
name = "css" name = "css"
language-servers = [ "scls", "vscode-css-language-server", "emmet-ls", "gpt" ] language-servers = [ "vscode-css-language-server", "scls", "gpt" ]
formatter = { command = 'prettier', args = ["--parser", "css"] } formatter = { command = 'prettier', args = ["--parser", "css"] }
auto-format = true auto-format = true

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save