Last active
June 14, 2023 14:49
-
-
Save FrancescElies/6616b6432c7f6a09da43c785528c522b to your computer and use it in GitHub Desktop.
helix editor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # theme = "adwaita-dark" | |
| theme = "sonokai" | |
| [editor.file-picker] | |
| hidden = false | |
| [editor.whitespace] | |
| # render = "all" | |
| render = "none" | |
| [editor.soft-wrap] | |
| enable = false | |
| [editor] | |
| mouse = false | |
| bufferline = "multiple" | |
| auto-save = false | |
| # shell = ["nu", "-c"] | |
| [editor.cursor-shape] | |
| insert = "bar" | |
| normal = "block" | |
| select = "underline" | |
| [editor.lsp] | |
| display-messages = true | |
| display-inlay-hints = true | |
| [editor.statusline] | |
| left = ["mode", "spinner"] | |
| center = ["file-name"] | |
| right = ["workspace-diagnostics","diagnostics", "selections", "position", "file-encoding", "file-line-ending", "file-type"] | |
| # [keys.normal] | |
| # esc = ["collapse_selection", "keep_primary_selection"] | |
| [keys.insert] | |
| j = { k = "normal_mode" } # Maps `jk` to exit insert mode | |
| [keys.normal.backspace] | |
| b = ":sh cargo build" | |
| a = ":pipe git add '%val{filename}'" | |
| Q = ":buffer-close!" | |
| q = ":buffer-close" | |
| c = ":config-open" | |
| x = ":xa" | |
| s = [":w",":config-reload"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Links | |
| # https://gist.github.com/FrancescElies/6616b6432c7f6a09da43c785528c522b/edit | |
| # https://github.com/helix-editor/helix/blob/master/languages.toml | |
| # https://github.com/helix-editor/helix/wiki/How-to-install-the-default-language-servers#ruff | |
| [language-server] | |
| # npm i -g vscode-langservers-extracted | |
| # cargo install taplo-cli --locked --features lsp | |
| pyright = { command = "pyright-langserver", args = ["--stdio"], config = {} } | |
| rome = { command = "rome", args = ["lsp-proxy"] } | |
| yaml-language-server = { command = "yaml-language-server", args = ["--stdio"], config = { "yaml.schemaStore.enable" = true, "yaml.keyOrdering" = false, "yaml.format.enable"= false } } | |
| [language-server.rust-analyzer] | |
| command = "rust-analyzer" | |
| [language-server.rust-analyzer.config] | |
| check = { command = "clippy"} | |
| inlayHints.bindingModeHints.enable = false | |
| inlayHints.closingBraceHints.minLines = 10 | |
| inlayHints.closureReturnTypeHints.enable = "with_block" | |
| inlayHints.discriminantHints.enable = "fieldless" | |
| inlayHints.lifetimeElisionHints.enable = "skip_trivial" | |
| inlayHints.typeHints.hideClosureInitialization = false | |
| [[language]] | |
| name = "c" | |
| auto-format = false | |
| formatter = { command = "clang-format" } | |
| [[language]] | |
| name = "json" | |
| language-servers = [ "vscode-json-language-server" ] | |
| auto-format = true | |
| # formatter = { command = 'prettier.cmd', args = ["--parser", "json"] } | |
| formatter = { command = 'rome.cmd', args = ["format", "--stdin-file-path", "file.json", "--config-path", "c:/s/eklang"] } | |
| [[language]] | |
| name = "rust" | |
| [[language]] | |
| name = "python" | |
| roots = ["pyproject.toml"] | |
| language-servers = [ "pyright" ] | |
| # language-servers = [ "pylsp" ] | |
| auto-format = true | |
| # ~/bin/ruff_black.nu | |
| # | |
| # ruff - --fix | black - -q | |
| formatter = { command = "nu", args = ["~/bin/ruff_black.nu"] } | |
| [[language]] | |
| name = "typescript" | |
| auto-format = true | |
| formatter = { command = 'rome.cmd', args = ["format", "--stdin-file-path", "file.ts"] } | |
| language-servers = [ "typescript-language-server", "rome" ] | |
| [[language]] | |
| name = "html" | |
| formatter = { command = 'prettier.cmd', args = ["--parser", "html"] } | |
| [[language]] | |
| name = "json" | |
| formatter = { command = 'prettier.cmd', args = ["--parser", "json"] } | |
| [[language]] | |
| name = "css" | |
| formatter = { command = 'prettier.cmd', args = ["--parser", "css"] } | |
| [[language]] | |
| name = "javascript" | |
| formatter = { command = 'rome.cmd', args = ["format", "--stdin-file-path", "file.js"] } | |
| auto-format = true | |
| [[language]] | |
| name = "yaml" | |
| auto-format = true | |
| formatter = { command = 'prettier.cmd', args = ["--end-of-line", "crlf", "--parser", "yaml"] } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment