Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hx LSP changes #14

Merged
merged 1 commit into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 46 additions & 30 deletions .config/helix/languages.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,29 @@
[[language]]
name = "bash" # and POSIX sh
name = "toml"
formatter = { command = "taplo", args = ["fmt", "-"] }
auto-format = true

[[language]]
# um, actually 🤓,
# I'd just like to interject for a moment.
# What you're refering to as "Bash", is in fact, POSIX/Ksh/Dash/Bash/Zsh/Fish,
# or as I've recently taken to calling it, *sh.
# Bash is a shell, but it's just one of many shells supported by "Bash-LSP",
#
# Many computer users run a modified version of the POSIX shell (such as Dash)
# every day, without realizing it.
# Through a peculiar turn of events,
# the version of POSIX-sh which is widely used today is often called "Bash",
# and many of its users are not aware that it is basically the POSIX-sh.
#
# There really is a Bash, and some people are using it,
# but it is just one shell among many.
name = "bash"
indent = { tab-width = 4, unit = "\t" }

[[language]]
name = "python"
language-servers = [ "pyright" ]
language-servers = ["pyright"]

[[language]]
name = "markdown"
Expand All @@ -13,54 +32,51 @@ indent = { tab-width = 4, unit = "\t" }

[[language]]
name = "html"
indent = { tab-width = 4, unit = "\t" }
indent = { tab-width = 3, unit = "\t" }

[[language]]
name = "css"
indent = { tab-width = 4, unit = "\t" }
indent = { tab-width = 3, unit = "\t" }

[[language]]
name = "json"
indent = { tab-width = 3, unit = "\t" }
auto-format = false

[language-server.vscode-json-language-server.config]
provideFormatter = true
[language-server.vscode-json-language-server.config.json]
validate.enable = true
format.enable = true
keepLines.enable = true

[[language]]
name = "javascript"
language-servers = ["typescript-language-server", "eslint"]
language-servers = [
"typescript-language-server",
"vscode-eslint-language-server",
]
indent = { tab-width = 4, unit = "\t" }
auto-format = true

[[language]]
name = "typescript"
language-servers = ["typescript-language-server", "eslint"]
language-servers = [
"typescript-language-server",
"vscode-eslint-language-server",
]
indent = { tab-width = 4, unit = "\t" }
auto-format = true

[language-server.eslint]
command = "vscode-eslint-language-server"
args = ["--stdio"]
[language-server.eslint.config]
validate = "on"
experimental = { useFlatConfig = false }
rulesCustomizations = []
run = "onType" # is there `onSave`?
problems = { shortenToSingleLine = false }
nodePath = ""
[language-server.eslint.config.codeAction]
[language-server.eslint.config.codeAction.disableRuleComment]
enable = true
location = "separateLine"
[language-server.eslint.config.codeAction.showDocumentation]
enable = true
[language-server.eslint.config.codeActionOnSave]
[language-server.vscode-eslint-language-server.config.codeActionOnSave]
enable = true
mode = "fixAll"
[language-server.eslint.config.workingDirectory]
mode = "location"

# `indent` controlled by `rustfmt`
[language-server.rust-analyzer.config.check]
command = "clippy"

[[language]]
name = "toml"
formatter = { command = "taplo", args = ["fmt", "-"] }

[[language]]
name = "go"
formatter.command = "goimports"
auto-format = true
formatter = { command = "goimports" }
2 changes: 2 additions & 0 deletions .config/taplo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[formatting]
align_comments = false
2 changes: 2 additions & 0 deletions .sh/exports
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ export NODE_REPL_MODE=strict
# Helix
export EDITOR=hx
#export VISUAL= # ???

export TAPLO_CONFIG="$HOME/.config/taplo.toml"