# TODO https://github.com/helix-editor/helix/wiki/Language-Server-Configurations#java [[language]] name = "lua" auto-format = false [[language]] name = "tsx" auto-format = true [[language]] name = "html" indent = { tab-width = 4, unit = " " } auto-format = false # [[language]] # name = "tera" # injection-regex = "html" # file-types = ["html"] [[language]] name = "markdown" [language.auto-pairs] '_' = '_' '(' = ')' '{' = '}' '[' = ']' '"' = '"' "'" = "'" # '`' = '`' [[language]] name = "markdown" language-servers = ["markdown-oxide", "vale-ls"] [language-server.markdown-oxide.config] unresolved_diagnostics = true include_md_extension_md_link = true # [File](file.md) or [File](file) # Hate it # [[language]] # name = "sql" # auto-format = false # formatter = { command = "sqlformat", args = [ # # "--keywords", # # "upper", # "upper", "lower", "capitalize" # # "--identifiers", # # "lower", # # "--reindent", # "--indent_width", # "2", # # "--indent_columns", # # "--compact", "True", # "-", # ] } [[language]] name = "toml" auto-format = true formatter = { command = "taplo", args = [ "format", # "-oalign_comments=false", "-", ] } [language-server.taplo.config] # HACK: this single line fixes "this document has been excluded" # root_dir = [".git", "*.toml"] # [language-server.yaml-language-server.config.yaml] # format = { enable = true } # validate = true # schemaStore = true # [language-server.yaml-language-server.config.yaml.schemas] # "" = "openapi.{yml,yaml}" [[language]] name = "nix" auto-format = true # formatter = { command = "alejandra" } [[language]] name = "typst" auto-format = true language-servers = ["tinymist"] [language-server.tinymist] command = "tinymist" [language-server.tinymist.config] formatterPrintWidth = 100 # can't stand 120 formatterMode = "typstyle" # or typstfmt exportPdf = "never" # onSave, default: never [[language]] name = "env" file-types = ["conf", { glob = ".env*" }, { glob = "env.example" }] [[language]] name = "devicetree" file-types = ["dts", "dtsi", "keymap"] # language-servers = ["devicetree_ls"] # [language-server.devicetree_ls] # command = "devicetree-language-server" # args = ["--stdio"] # [language-server.devicetree_ls.config.devicetree] # # cwd = "~/src/keyboard/zmk" # defaultIncludePaths = [ # "~/src/keyboard/zmk/app/dts", # ] # # defaultBindingType = "Zephyr" # # defaultZephyrBindings = ["./zephyr/dts/bindings"] # # contexts = [] [language-server.typescript-language-server.config] format = { indentSize = 4 } # [[language]] # name = "python" # language-servers = ["pylsp", "ruff"] # auto-format = true # scope = "source.python" # [language.formatter] # command = "ruff" # args = ["format", "-"] # [language-server.ruff] # command = "ruff" # args = ["server"] # [language-server.pylsp.config.pylsp.plugins] # pylsp_mypy.enabled = true # pylsp_mypy.live_mode = true # rope_autoimport.enabled = true [[language]] name = "rust" # language-servers = ["rust-analyzer", "bacon-ls"] [language.debugger] name = "lldb-dap" transport = "stdio" command = "lldb-dap" [[language.debugger.templates]] name = "binary" request = "launch" completion = [{ name = "binary", completion = "filename" }] args = { program = "{0}", initCommands = [ "command script import /usr/local/etc/lldb_vscode_rustc_primer.py", ] } [language-server.bacon-ls] command = "bacon-ls" [language-server.rust-analyzer.config] checkOnSave = true procMacro.enable = true # for bacon # checkOnSave = { enable = false } # diagnostics = { enable = false } [language-server.rust-analyzer.config.cargo] features = "all" targetDir = true # runBuildScripts = true # loadOutDirsFromCheck = true [language-server.rust-analyzer.config.check] features = "all" command = "clippy" extraArgs = [ "--", "--no-deps", # run Clippy only on the given crate # Deny, Warn, Allow, Forbid "-Wclippy::correctness", # code that is outright wrong or useless "-Wclippy::complexity", # code that does something simple but in a complex way "-Wclippy::suspicious", # code that is most likely wrong or useless "-Wclippy::style", # code that should be written in a more idiomatic way "-Wclippy::perf", # code that can be written to run faster "-Wclippy::pedantic", # lints which are rather strict or have occasional false positives "-Wclippy::nursery", # new lints that are still under development "-Aclippy::cargo", # lints for the cargo manifest "-Aclippy::restriction", # lints which prevent the use of language and library features # Specific "-Aclippy::must_use_candidate", # must_use is rather annoing "-Aclippy::cognitive_complexity", "-Aclippy::too_many_lines", "-Aclippy::missing_errors_doc", "-Aclippy::from_iter_instead_of_collect", # formats better ]