Helix
This commit is contained in:
@ -10,37 +10,122 @@ shell = ["fish", "-c"]
|
|||||||
line-number = "relative"
|
line-number = "relative"
|
||||||
cursorline = true
|
cursorline = true
|
||||||
continue-comments = false # annoying
|
continue-comments = false # annoying
|
||||||
gutters = ["diagnostics", "line-numbers", "diff"]
|
auto-completion = true # TODO: is it annoying?
|
||||||
auto-completion = true # TODO: is it annoying?
|
completion-replace = true # why is it not default
|
||||||
completion-replace = true
|
|
||||||
auto-format = true
|
auto-format = true
|
||||||
auto-info = true # TODO: idle-timeout?
|
auto-info = true # TODO: idle-timeout?
|
||||||
# true-color = true
|
# true-color = true
|
||||||
|
# undercurl = true
|
||||||
rulers = [80, 100]
|
rulers = [80, 100]
|
||||||
bufferline = "multiple" # never, always, multiple
|
bufferline = "multiple" # never, always, multiple
|
||||||
color-modes = true # mode indicator color
|
color-modes = false # mode indicator color
|
||||||
insert-final-newline = true # POSIX compatibility
|
insert-final-newline = true # POSIX lines finish with \n
|
||||||
popup-border = "none" # popup, menu, all, none
|
popup-border = "none" # popup, menu, all, none
|
||||||
jump-label-alphabet = "tneiouykhsrafwvd"
|
jump-label-alphabet = "tneiouykhsrafwvd"
|
||||||
end-of-line-diagnostics = "disable" # TODO: check `inline-diagnostics`
|
end-of-line-diagnostics = "hint" # disable, error, warning, info, hint
|
||||||
|
|
||||||
# file-picker.hidden = true
|
[editor.inline-diagnostics]
|
||||||
cursor-shape.insert = "underline"
|
cursor-line = "warning"
|
||||||
|
other-lines = "error"
|
||||||
|
prefix-len = 1
|
||||||
|
max-diagnostics = 5 # 10
|
||||||
|
|
||||||
[editor.statusline.mode]
|
[editor.statusline]
|
||||||
normal = "N"
|
mode = { normal = "N", insert = "I", select = "S" }
|
||||||
insert = "I"
|
left = [
|
||||||
select = "S"
|
"mode",
|
||||||
|
"spinner",
|
||||||
|
"version-control",
|
||||||
|
"file-name",
|
||||||
|
"read-only-indicator",
|
||||||
|
"file-modification-indicator",
|
||||||
|
"file-type",
|
||||||
|
"file-line-ending",
|
||||||
|
"file-encoding",
|
||||||
|
]
|
||||||
|
right = [
|
||||||
|
"register",
|
||||||
|
"diagnostics",
|
||||||
|
"workspace-diagnostics",
|
||||||
|
"selections",
|
||||||
|
"primary-selection-length",
|
||||||
|
"position",
|
||||||
|
"total-line-numbers",
|
||||||
|
]
|
||||||
|
|
||||||
|
[editor.lsp]
|
||||||
|
display-progress-messages = true # looks cool
|
||||||
|
display-inlay-hints = true # feels good
|
||||||
|
|
||||||
|
[editor.cursor-shape]
|
||||||
|
normal = "block"
|
||||||
|
insert = "bar"
|
||||||
|
select = "underline"
|
||||||
|
|
||||||
|
[editor.file-picker]
|
||||||
|
hidden = true
|
||||||
|
|
||||||
|
[editor.whitespace.render]
|
||||||
|
tab = "all"
|
||||||
|
nbsp = "all"
|
||||||
|
nnbsp = "all"
|
||||||
|
space = "none"
|
||||||
|
newline = "none"
|
||||||
|
[editor.whitespace.characters]
|
||||||
|
tab = ''
|
||||||
|
nbsp = '⍽'
|
||||||
|
nnbsp = '␣'
|
||||||
|
space = '🞄'
|
||||||
|
newline = ''
|
||||||
|
|
||||||
|
[editor.indent-guides]
|
||||||
|
render = true
|
||||||
|
character = "┆" # "╎", "▏", "┆", "┊", "⸽"
|
||||||
|
skip-levels = 1
|
||||||
|
|
||||||
|
[editor.gutters]
|
||||||
|
layout = ["diff", "diagnostics", "line-numbers", "spacer"] # TODO: don't like
|
||||||
|
line-numbers.min-width = 0
|
||||||
|
|
||||||
|
[editor.soft-wrap]
|
||||||
|
enable = true
|
||||||
|
max-wrap = 20 # increase to reduce forced wrapping
|
||||||
|
max-indent-retain = 0 # 40
|
||||||
|
wrap-indicator = "↪"
|
||||||
|
|
||||||
|
|
||||||
|
[keys.insert]
|
||||||
|
S-tab = "move_parent_node_start"
|
||||||
|
|
||||||
|
[keys.select]
|
||||||
|
tab = "extend_parent_node_end"
|
||||||
|
S-tab = "extend_parent_node_start"
|
||||||
|
|
||||||
[keys.normal]
|
[keys.normal]
|
||||||
# "<space>=" = ":format"
|
tab = "move_parent_node_end"
|
||||||
D = [ "extend_to_line_end", "delete_selection" ]
|
S-tab = "move_parent_node_start"
|
||||||
|
|
||||||
# previous/next buffer
|
"=" = ":format"
|
||||||
|
"A-=" = "format_selections"
|
||||||
|
|
||||||
|
D = ["extend_to_line_end", "delete_selection"]
|
||||||
|
|
||||||
|
C-k = "jump_view_up"
|
||||||
|
C-h = "jump_view_left"
|
||||||
|
C-j = "jump_view_down"
|
||||||
|
C-l = "jump_view_right"
|
||||||
L = "goto_next_buffer"
|
L = "goto_next_buffer"
|
||||||
H = "goto_previous_buffer"
|
H = "goto_previous_buffer"
|
||||||
# move/copy line below/above
|
|
||||||
"A-j" = [ "extend_to_line_bounds", "delete_selection", "paste_after" ]
|
A-j = ["extend_to_line_bounds", "delete_selection", "paste_after"]
|
||||||
"A-k" = [ "extend_to_line_bounds", "delete_selection", "move_line_up", "paste_before" ]
|
A-k = [
|
||||||
"A-J" = [ "extend_to_line_bounds", "yank", "paste_after" ]
|
"extend_to_line_bounds",
|
||||||
"A-K" = [ "extend_to_line_bounds", "yank", "paste_before" ]
|
"delete_selection",
|
||||||
|
"move_line_up",
|
||||||
|
"paste_before",
|
||||||
|
]
|
||||||
|
A-J = ["extend_to_line_bounds", "yank", "paste_after"]
|
||||||
|
A-K = ["extend_to_line_bounds", "yank", "paste_before"]
|
||||||
|
|
||||||
|
[keys.normal."+"]
|
||||||
|
c = ":config-reload"
|
||||||
|
@ -1,23 +1,65 @@
|
|||||||
|
[[language]]
|
||||||
|
name = "markdown"
|
||||||
|
[language.auto-pairs]
|
||||||
|
'_' = '_'
|
||||||
|
'(' = ')'
|
||||||
|
'{' = '}'
|
||||||
|
'[' = ']'
|
||||||
|
'"' = '"'
|
||||||
|
"'" = "'"
|
||||||
|
'`' = '`'
|
||||||
|
# '<' = '>'
|
||||||
|
|
||||||
|
[[language]]
|
||||||
|
name = "lua"
|
||||||
|
auto-format = false
|
||||||
|
|
||||||
|
[[language]]
|
||||||
|
name = "toml"
|
||||||
|
auto-format = true
|
||||||
|
|
||||||
|
|
||||||
[language-server.taplo]
|
[language-server.taplo]
|
||||||
config = {} # https://github.com/helix-editor/helix/issues/3897
|
config = {} # https://github.com/helix-editor/helix/issues/3897
|
||||||
|
|
||||||
[language-server.rust-analyzer]
|
|
||||||
checkOnSave = true
|
|
||||||
cargo = { allFeatures = true, loadOutDirsFromCheck = true, runBuildScripts = true }
|
|
||||||
|
|
||||||
check.command = "clippy"
|
[language-server.tinymist.config]
|
||||||
check.extraArgs = [ "--",
|
formatterPrintWidth = 100 # can't stand 120
|
||||||
"--no-deps",
|
formatterMode = "typstyle" # or typstfmt
|
||||||
"-Wclippy::correctness",
|
exportPdf = "onSave" # "onDocumentHasTitle", # default: never
|
||||||
"-Wclippy::complexity",
|
semanticTokens = "enable"
|
||||||
"-Wclippy::suspicious",
|
|
||||||
"-Wclippy::style",
|
|
||||||
"-Wclippy::perf",
|
# [language-server.tinymist.nil]
|
||||||
"-Wclippy::pedantic",
|
# formatting.command = "alejandra"
|
||||||
"-Wclippy::nursery",
|
|
||||||
"-Wclippy::cargo",
|
|
||||||
"-Aclippy::restriction",
|
[language-server.rust-analyzer.config]
|
||||||
"-Aclippy::must_use_candidate",
|
checkOnSave = true
|
||||||
]
|
|
||||||
procMacro.enable = true
|
procMacro.enable = true
|
||||||
|
|
||||||
|
[language-server.rust-analyzer.config.cargo]
|
||||||
|
features = "all"
|
||||||
|
loadOutDirsFromCheck = true
|
||||||
|
runBuildScripts = 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
|
||||||
|
"-Wclippy::cargo", # lints for the cargo manifest
|
||||||
|
# Use in production
|
||||||
|
"-Aclippy::restriction", # lints which prevent the use of language and library features
|
||||||
|
# Other
|
||||||
|
"-Aclippy::must_use_candidate", # must_use is rather annoing
|
||||||
|
]
|
||||||
|
@ -28,7 +28,7 @@ disable_ligatures cursor
|
|||||||
# cursor_shape block
|
# cursor_shape block
|
||||||
# cursor_beam_thickness 1.5
|
# cursor_beam_thickness 1.5
|
||||||
# cursor_underline_thickness 2.0
|
# cursor_underline_thickness 2.0
|
||||||
# cursor_blink_interval -1
|
cursor_blink_interval 0.5
|
||||||
cursor_stop_blinking_after 10
|
cursor_stop_blinking_after 10
|
||||||
|
|
||||||
# }}}
|
# }}}
|
||||||
|
@ -2,14 +2,14 @@ return {
|
|||||||
settings = {
|
settings = {
|
||||||
["rust-analyzer"] = {
|
["rust-analyzer"] = {
|
||||||
cargo = {
|
cargo = {
|
||||||
allFeatures = true,
|
features = "all",
|
||||||
loadOutDirsFromCheck = true,
|
loadOutDirsFromCheck = true,
|
||||||
runBuildScripts = true,
|
runBuildScripts = true,
|
||||||
},
|
},
|
||||||
-- Add clippy lints for Rust.
|
-- Add clippy lints for Rust.
|
||||||
checkOnSave = true,
|
checkOnSave = true,
|
||||||
check = {
|
check = {
|
||||||
-- allFeatures = true,
|
features = "all",
|
||||||
command = "clippy",
|
command = "clippy",
|
||||||
extraArgs = {
|
extraArgs = {
|
||||||
"--",
|
"--",
|
||||||
|
Reference in New Issue
Block a user