From 74cb22d7d171c0c44090b2044bd6d9d90512bbe0 Mon Sep 17 00:00:00 2001 From: amtoine <44101798+AntoineStevan@users.noreply.github.com> Date: Sun, 2 Oct 2022 19:27:21 +0200 Subject: [PATCH 01/10] set helix as the default editor --- .bashrc | 4 ++-- .config/dmenu-extended/config/dmenuExtended_preferences.txt | 6 +++--- .config/gh/config.yml | 2 +- .config/git/config | 2 +- .config/kitty/kitty.conf | 2 +- .config/nushell/config.nu | 2 +- .config/nushell/env.nu | 4 ++-- .config/nushell/scripts/functions.nu | 6 +++--- .config/surf/scripts/edit.url.sh | 2 +- .config/tg/conf.py | 4 ++-- 10 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.bashrc b/.bashrc index 7d1aaa29..7aebb68b 100644 --- a/.bashrc +++ b/.bashrc @@ -208,8 +208,8 @@ export PATH="$HOME/.local/bin:$EMACS_HOME/bin:$CARGO_HOME/bin:$PATH" export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$MUJOCO_BIN" # changes the editor in the terminal, to edit long commands. -export EDITOR='vim' -export VISAL='vim' +export EDITOR='helix' +export VISAL='helix' set -o vi ### SET MANPAGER diff --git a/.config/dmenu-extended/config/dmenuExtended_preferences.txt b/.config/dmenu-extended/config/dmenuExtended_preferences.txt index f6888947..093f370b 100644 --- a/.config/dmenu-extended/config/dmenuExtended_preferences.txt +++ b/.config/dmenu-extended/config/dmenuExtended_preferences.txt @@ -36,8 +36,8 @@ "path_shellCommand": "~/.dmenuEextended_shellCommand.sh", "prompt": "Open:", "scan_hidden_folders": false, - "terminal": "st", - "terminal_editor": "vim", + "terminal": "alacritty", + "terminal_editor": "helix", "valid_extensions": [ "py", "svg", @@ -73,4 +73,4 @@ "~/" ], "webbrowser": "xdg-open" -} \ No newline at end of file +} diff --git a/.config/gh/config.yml b/.config/gh/config.yml index de819e76..8b83c424 100644 --- a/.config/gh/config.yml +++ b/.config/gh/config.yml @@ -1,7 +1,7 @@ # What protocol to use when performing git operations. Supported values: ssh, https git_protocol: https # What editor gh should run when creating issues, pull requests, etc. If blank, will refer to environment. -editor: vim +editor: helix # When to interactively prompt. This is a global config that cannot be overridden by hostname. Supported values: enabled, disabled prompt: enabled # A pager program to send command output to, e.g. "less". Set the value to "cat" to disable the pager. diff --git a/.config/git/config b/.config/git/config index 7a62ad32..1ce04289 100644 --- a/.config/git/config +++ b/.config/git/config @@ -39,7 +39,7 @@ defaultBranch = main [core] - editor = vim + editor = helix pager = delta [delta] diff --git a/.config/kitty/kitty.conf b/.config/kitty/kitty.conf index 8e6e5f7e..04fd045d 100644 --- a/.config/kitty/kitty.conf +++ b/.config/kitty/kitty.conf @@ -1143,7 +1143,7 @@ shell /usr/bin/fish #: --login and --interactive to ensure that the shell starts in #: interactive mode and reads its startup rc files. -editor nvim +editor helix #: The terminal editor (such as ``vim`` or ``nano``) to use when #: editing the kitty config file or similar tasks. diff --git a/.config/nushell/config.nu b/.config/nushell/config.nu index b6aece6d..c6854330 100644 --- a/.config/nushell/config.nu +++ b/.config/nushell/config.nu @@ -20,7 +20,7 @@ let-env config = { partial_completions: true # set this to false to prevent partial filling of the prompt completion_algorithm: "prefix" # prefix, fuzzy float_precision: 2 - buffer_editor: "vim" # command that will be used to edit the current line buffer with ctrl+o, if unset fallback to $env.EDITOR and $env.VISUAL + #buffer_editor: "helix" # command that will be used to edit the current line buffer with ctrl+o, if unset fallback to $env.EDITOR and $env.VISUAL use_ansi_coloring: true filesize_format: "auto" # b, kb, kib, mb, mib, gb, gib, tb, tib, pb, pib, eb, eib, zb, zib, auto edit_mode: vi # emacs, vi diff --git a/.config/nushell/env.nu b/.config/nushell/env.nu index eff2c712..99f76ad2 100644 --- a/.config/nushell/env.nu +++ b/.config/nushell/env.nu @@ -102,8 +102,8 @@ let-env MUJOCO_BIN = $"($env.HOME)/.mujoco/mujoco210/bin" let-env VIMINIT = 'let $MYVIMRC="$XDG_CONFIG_HOME/vim/vimrc" | source $MYVIMRC' # changes the editor in the terminal, to edit long commands. -let-env EDITOR = 'vim' -let-env VISAL = 'vim' +let-env EDITOR = 'helix' +let-env VISAL = 'helix' ### SET MANPAGER ### Uncomment only one of these! diff --git a/.config/nushell/scripts/functions.nu b/.config/nushell/scripts/functions.nu index 3d42a56f..f9eb908a 100644 --- a/.config/nushell/scripts/functions.nu +++ b/.config/nushell/scripts/functions.nu @@ -89,14 +89,14 @@ export def-env repo [] { export def-env vcfg [] { - # jump to any config file with vim + # jump to any config file with $env.EDITOR # # the function will: # - (1) do nothing and abort when selecting no config file. - # - (2) jump to the selected file and start it in a vim buffer + # - (2) jump to the selected file and start it in a buffer # # dependencies: - # - vim + # - $env.EDITOR # - fzf # let choice = ( diff --git a/.config/surf/scripts/edit.url.sh b/.config/surf/scripts/edit.url.sh index 5d2fe3e8..f30f64bf 100755 --- a/.config/surf/scripts/edit.url.sh +++ b/.config/surf/scripts/edit.url.sh @@ -19,4 +19,4 @@ dir=~/.config/surf/tmpedit name=`ls $dir | wc -l` file=$dir/$name.html -sselp > $file && kitty vim $file +sselp > $file && kitty $EDITOR $file diff --git a/.config/tg/conf.py b/.config/tg/conf.py index c8573698..6e2aabbb 100644 --- a/.config/tg/conf.py +++ b/.config/tg/conf.py @@ -67,9 +67,9 @@ def get_pass(key): VIEW_TEXT_CMD = "less" FZF = "fzf" -LONG_MSG_CMD = "vim + -c 'startinsert' {file_path}" -# LONG_MSG_CMD = "devour emacsclient -c -a 'emacs' {file_path}" EDITOR = os.environ.get("EDITOR", "vi") +LONG_MSG_CMD = f"{EDITOR}" + " + -c 'startinsert' {file_path}" +# LONG_MSG_CMD = "devour emacsclient -c -a 'emacs' {file_path}" # Specifies range of colors to use for drawing users with # different colors From 394d4af313f8c986263ded9e6b8d5c797180a2a2 Mon Sep 17 00:00:00 2001 From: amtoine <44101798+AntoineStevan@users.noreply.github.com> Date: Mon, 3 Oct 2022 19:23:10 +0200 Subject: [PATCH 02/10] use the dracula theme --- .config/helix/config.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/helix/config.toml b/.config/helix/config.toml index e2191766..59db1ac6 100644 --- a/.config/helix/config.toml +++ b/.config/helix/config.toml @@ -1,4 +1,4 @@ -theme = "onedark" +theme = "dracula" [editor] line-number = "relative" From a2b0149e132d7d6c9ab4ee4f252473749f74501f Mon Sep 17 00:00:00 2001 From: amtoine <44101798+amtoine@users.noreply.github.com> Date: Tue, 4 Oct 2022 19:56:35 +0200 Subject: [PATCH 03/10] add all the (tweaked) basic config --- .config/helix/config.toml | 53 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 52 insertions(+), 1 deletion(-) diff --git a/.config/helix/config.toml b/.config/helix/config.toml index 59db1ac6..5c831731 100644 --- a/.config/helix/config.toml +++ b/.config/helix/config.toml @@ -3,6 +3,34 @@ theme = "dracula" [editor] line-number = "relative" mouse = false +scrolloff = 3 +middle-click-paste = false +scroll-lines = 3 +shell = ["nu", "-c"] +cursorline = false +gutters = ["diagnostics", "line-numbers"] +auto-completion = true +auto-format = false +idle-timeout = 400 +completion-trigger-len = 2 +auto-info = true +true-color = false +rulers = [] +color-modes = false +auto-pairs = true + +[editor.statusline] +left = ["mode", "spinner"] +center = ["file-name"] +right = [ + "diagnostics", "selections", "position", "file-encoding", "file-line-ending", "file-type" +] +separator = "│" + +[editor.lsp] +display-messages = false +auto-signature-help = true +display-signature-help-docs = true [editor.cursor-shape] insert = "bar" @@ -10,4 +38,27 @@ normal = "block" select = "underline" [editor.file-picker] -hidden = false +hidden = true +parents = true +ignore = true +git-ignore = true +git-global = true +git-exclude = true + +[editor.search] +smart-case = true +wrap-around = true + +[editor.whitespace] +render = "all" + +[editor.whitespace.characters] +space = "·" +nbsp = "⍽" +tab = "→" +newline = "⏎" +tabpad = "·" # Tabs will look like "→···" (depending on tab width) + +[editor.indent-guides] +render = true +character = "│" \ No newline at end of file From 3e9b5ca33438957e88116ed6ec9b64569e3b19c4 Mon Sep 17 00:00:00 2001 From: amtoine <44101798+amtoine@users.noreply.github.com> Date: Wed, 5 Oct 2022 18:36:04 +0200 Subject: [PATCH 04/10] do not render indent guides --- .config/helix/config.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/helix/config.toml b/.config/helix/config.toml index 5c831731..0b28c327 100644 --- a/.config/helix/config.toml +++ b/.config/helix/config.toml @@ -60,5 +60,5 @@ newline = "⏎" tabpad = "·" # Tabs will look like "→···" (depending on tab width) [editor.indent-guides] -render = true +render = false character = "│" \ No newline at end of file From 8e27a02b4a48e6285921d1a76a644dc808b4dd3e Mon Sep 17 00:00:00 2001 From: amtoine <44101798+amtoine@users.noreply.github.com> Date: Thu, 6 Oct 2022 19:02:41 +0200 Subject: [PATCH 05/10] use the pascal grammar in oberon files --- .config/helix/languages.toml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .config/helix/languages.toml diff --git a/.config/helix/languages.toml b/.config/helix/languages.toml new file mode 100644 index 00000000..5c9ae526 --- /dev/null +++ b/.config/helix/languages.toml @@ -0,0 +1,3 @@ +[[language]] +name = "pascal" +file-types = ["pas", "pp", "inc", "lpr", "lfm", "obn", "mod", "Mod"] From 48765d3ec4236003aec093005d1de8d44dc46c95 Mon Sep 17 00:00:00 2001 From: amtoine <44101798+amtoine@users.noreply.github.com> Date: Fri, 7 Oct 2022 10:35:56 +0200 Subject: [PATCH 06/10] add proper syntax highlighting for oberon --- .config/helix/languages.toml | 10 +- .../runtime/queries/oberon/highlights.scm | 382 ++++++++++++++++++ .../runtime/queries/oberon/injections.scm | 2 + .../runtime/queries/oberon/textobjects.scm | 10 + 4 files changed, 402 insertions(+), 2 deletions(-) create mode 100644 .config/helix/runtime/queries/oberon/highlights.scm create mode 100644 .config/helix/runtime/queries/oberon/injections.scm create mode 100644 .config/helix/runtime/queries/oberon/textobjects.scm diff --git a/.config/helix/languages.toml b/.config/helix/languages.toml index 5c9ae526..94313dc7 100644 --- a/.config/helix/languages.toml +++ b/.config/helix/languages.toml @@ -1,3 +1,9 @@ [[language]] -name = "pascal" -file-types = ["pas", "pp", "inc", "lpr", "lfm", "obn", "mod", "Mod"] +name = "oberon" +scope = "source.oberon" +injection-regex = "oberon" +file-types = ["obn", "Mod", "mod"] +roots = [] +comment-token = "(*" +indent = { tab-width = 4, unit = " " } +grammar = "pascal" diff --git a/.config/helix/runtime/queries/oberon/highlights.scm b/.config/helix/runtime/queries/oberon/highlights.scm new file mode 100644 index 00000000..5368a22b --- /dev/null +++ b/.config/helix/runtime/queries/oberon/highlights.scm @@ -0,0 +1,382 @@ +; -- Identifier type inferrence + +; VERY QUESTIONABLE: Highlighting of identifiers based on spelling +(exprBinary ((identifier) @constant + (#match? @constant "^[A-Z][A-Z0-9_]+$|^[a-z]{2,3}[A-Z].+$"))) +(exprUnary ((identifier) @constant + (#match? @constant "^[A-Z][A-Z0-9_]+$|^[a-z]{2,3}[A-Z].+$"))) +(assignment rhs: ((identifier) @constant + (#match? @constant "^[A-Z][A-Z0-9_]+$|^[a-z]{2,3}[A-Z].+$"))) +(exprBrackets ((identifier) @constant + (#match? @constant "^[A-Z][A-Z0-9_]+$|^[a-z]{2,3}[A-Z].+$"))) +(exprParens ((identifier) @constant + (#match? @constant "^[A-Z][A-Z0-9_]+$|^[a-z]{2,3}[A-Z].+$"))) +(exprDot rhs: ((identifier) @constant + (#match? @constant "^[A-Z][A-Z0-9_]+$|^[a-z]{2,3}[A-Z].+$"))) +(exprTpl args: ((identifier) @constant + (#match? @constant "^[A-Z][A-Z0-9_]+$|^[a-z]{2,3}[A-Z].+$"))) +(exprArgs ((identifier) @constant + (#match? @constant "^[A-Z][A-Z0-9_]+$|^[a-z]{2,3}[A-Z].+$"))) +(declEnumValue ((identifier) @constant + (#match? @constant "^[A-Z][A-Z0-9_]+$|^[a-z]{2,3}[A-Z].+$"))) +(defaultValue ((identifier) @constant + (#match? @constant "^[A-Z][A-Z0-9_]+$|^[a-z]{2,3}[A-Z].+$"))) + +; -- Break, Continue & Exit +; (Not ideal: ideally, there would be a way to check if these special +; identifiers are shadowed by a local variable) +(statement ((identifier) @keyword.control.return + (#match? @keyword.control.return "^[eE][xX][iI][tT]$"))) +(statement (exprCall entity: ((identifier) @keyword.control.return + (#match? @keyword.control.return "^[eE][xX][iI][tT]$")))) +(statement ((identifier) @keyword.control.repeat + (#match? @keyword.control.repeat "^[bB][rR][eE][aA][kK]$"))) +(statement ((identifier) @keyword.control.repeat + (#match? @keyword.control.repeat "^[cC][oO][nN][tT][iI][nN][uU][eE]$"))) + +; -- Heuristic for procedure/function calls without parentheses +; (If a statement consists only of an identifier, assume it's a procedure) +; (This will still not match all procedure calls, and also may produce false +; positives in rare cases, but only for nonsensical code) + +(statement (exprDot rhs: (exprTpl entity: (identifier) @function))) +(statement (exprTpl entity: (identifier) @function)) +(statement (exprDot rhs: (identifier) @function)) +(statement (identifier) @function) + +; -- Procedure name in calls with parentheses +; (Pascal doesn't require parentheses for procedure calls, so this will not +; detect all calls) + +(inherited) @function + +; foo.bar +(exprCall entity: (exprDot rhs: (exprTpl entity: (identifier) @function))) +; foo.bar +(exprCall entity: (exprDot rhs: (identifier) @function)) +; foobar +(exprCall entity: (exprTpl entity: (identifier) @function)) +; foobar +(exprCall entity: (identifier) @function) + +; -- Fields + +(declSection (declVars (declVar name:(identifier) @variable.other.member))) +(declSection (declField name:(identifier) @variable.other.member)) +(declClass (declField name:(identifier) @variable.other.member)) +(exprDot rhs: (exprDot) @variable.other.member) +(exprDot rhs: (identifier) @variable.other.member) + +(recInitializerField name:(identifier) @variable.other.member) + +; -- Variable & constant declarations +; (This is only questionable because we cannot detect types of identifiers +; declared in other units, so the results will be inconsistent) + +(declVar name: (identifier) @variable) +(declConst name: (identifier) @constant) +(declEnumValue name: (identifier) @constant) + +; -- Constant usage + +[ + (caseLabel) + (label) +] @constant + +(procAttribute (identifier) @constant) +(procExternal (identifier) @constant) + +; -- Type usage + +(typeref) @type + +; -- Exception parameters + +(exceptionHandler variable: (identifier) @variable.parameter) + +; -- Template parameters + +(genericArg type: (typeref) @type) +(genericArg name: (identifier) @variable.parameter) + +(declProc name: (genericDot lhs: (identifier) @type)) +(declType (genericDot (identifier) @type)) + +(genericDot (genericTpl (identifier) @type)) +(genericDot (genericDot (identifier) @type)) + +(genericTpl entity: (genericDot (identifier) @type)) +(genericTpl entity: (identifier) @type) + +; -- Function parameters + +(declArg name: (identifier) @variable.parameter) + +; Treat property declarations like functions + +(declProp name: (identifier) @function) +(declProp getter: (identifier) @variable.other.member) +(declProp setter: (identifier) @variable.other.member) + +; -- Procedure & function declarations + +; foo.bar +(declProc name: (genericDot rhs: (genericTpl entity: (identifier) @function))) +; foo.bar +(declProc name: (genericDot rhs: (identifier) @function)) +; foobar +(declProc name: (genericTpl entity: (identifier) @function)) +; foobar +(declProc name: (identifier) @function) + +; -- Type declaration + +(declType name: (genericTpl entity: (identifier) @type)) +(declType name: (identifier) @type) + +; -- Comments + +(comment) @comment +(pp) @function.macro + +; -- Variables + +(exprBinary (identifier) @variable) +(exprUnary (identifier) @variable) +(assignment (identifier) @variable) +(exprBrackets (identifier) @variable) +(exprParens (identifier) @variable) +(exprDot (identifier) @variable) +(exprTpl (identifier) @variable) +(exprArgs (identifier) @variable) +(defaultValue (identifier) @variable) + +; -- Literals + +(literalNumber) @constant.builtin.numeric +(literalString) @string + +; -- Builtin constants + +[ + (kTrue) + (kFalse) +] @constant.builtin.boolean + +[ + (kNil) +] @constant.builtin + +; -- Punctuation & operators + +[ + (kOr) + (kXor) + (kDiv) + (kMod) + (kAnd) + (kShl) + (kShr) + (kNot) + (kIs) + (kAs) + (kIn) +] @keyword.operator + +[ + (kDot) + (kAdd) + (kSub) + (kMul) + (kFdiv) + (kAssign) + (kAssignAdd) + (kAssignSub) + (kAssignMul) + (kAssignDiv) + (kEq) + (kLt) + (kLte) + (kGt) + (kGte) + (kNeq) + (kAt) + (kHat) +] @operator + +[ + ".." +] @punctuation.special + +[ + ";" + "," + ":" + (kEndDot) +] @punctuation.delimiter + +[ + "(" + ")" + "[" + "]" +] @punctuation.bracket + +; -- Attributes + +(procAttribute (kPublic) @attribute) + +[ + (kDefault) + (kIndex) + (kNodefault) + (kStored) + + (kStatic) + (kVirtual) + (kAbstract) + (kSealed) + (kDynamic) + (kOverride) + (kOverload) + (kReintroduce) + (kInline) + + (kForward) + + (kStdcall) + (kCdecl) + (kCppdecl) + (kPascal) + (kRegister) + (kMwpascal) + (kExternal) + (kName) + (kMessage) + (kDeprecated) + (kExperimental) + (kPlatform) + (kUnimplemented) + (kCvar) + (kExport) + (kFar) + (kNear) + (kSafecall) + (kAssembler) + (kNostackframe) + (kInterrupt) + (kNoreturn) + (kIocheck) + (kLocal) + (kHardfloat) + (kSoftfloat) + (kMs_abi_default) + (kMs_abi_cdecl) + (kSaveregisters) + (kSysv_abi_default) + (kSysv_abi_cdecl) + (kVectorcall) + (kVarargs) + (kWinapi) + (kAlias) + (kDelayed) + + (rttiAttributes) + (procAttribute) + +] @attribute + +; -- Keywords +[ + (kProgram) + (kLibrary) + (kUnit) + (kUses) + + (kBegin) + (kEnd) + (kAsm) + + (kVar) + (kThreadvar) + (kConst) + (kResourcestring) + (kConstref) + (kOut) + (kType) + (kLabel) + (kExports) + + (kAbsolute) + + (kProperty) + (kRead) + (kWrite) + (kImplements) + + (kClass) + (kInterface) + (kObject) + (kRecord) + (kObjcclass) + (kObjccategory) + (kObjcprotocol) + (kArray) + (kFile) + (kString) + (kSet) + (kOf) + (kHelper) + (kPacked) + + (kInherited) + + (kGeneric) + (kSpecialize) + + (kFunction) + (kProcedure) + (kConstructor) + (kDestructor) + (kOperator) + (kReference) + + (kInterface) + (kImplementation) + (kInitialization) + (kFinalization) + + (kPublished) + (kPublic) + (kProtected) + (kPrivate) + (kStrict) + (kRequired) + (kOptional) + + (kTry) + (kExcept) + (kFinally) + (kRaise) + (kOn) + (kCase) + (kWith) + (kGoto) +] @keyword + +[ + (kFor) + (kTo) + (kDownto) + (kDo) + (kWhile) + (kRepeat) + (kUntil) +] @keyword.control.repeat + +[ + (kIf) + (kThen) + (kElse) +] @keyword.control.conditional diff --git a/.config/helix/runtime/queries/oberon/injections.scm b/.config/helix/runtime/queries/oberon/injections.scm new file mode 100644 index 00000000..321c90ad --- /dev/null +++ b/.config/helix/runtime/queries/oberon/injections.scm @@ -0,0 +1,2 @@ +((comment) @injection.content + (#set! injection.language "comment")) diff --git a/.config/helix/runtime/queries/oberon/textobjects.scm b/.config/helix/runtime/queries/oberon/textobjects.scm new file mode 100644 index 00000000..56dbe540 --- /dev/null +++ b/.config/helix/runtime/queries/oberon/textobjects.scm @@ -0,0 +1,10 @@ + +(declType (declClass (declSection) @class.inside)) @class.around + +(defProc body: (_) @function.inside) @function.around + +(declArgs (_) @parameter.inside) @parameter.around +(exprArgs (_) @parameter.inside) @parameter.around + +(comment) @comment.inside +(comment)+ @comment.around From d0a950792fdb3824202179f776202c5e8bd33156 Mon Sep 17 00:00:00 2001 From: amtoine <44101798+amtoine@users.noreply.github.com> Date: Fri, 7 Oct 2022 10:38:07 +0200 Subject: [PATCH 07/10] build the editor from source --- .config/git/config | 2 +- .config/nushell/env.nu | 4 ++-- .config/nushell/scripts/aliases.nu | 1 - pkgs.toml | 21 +++++++++------------ 4 files changed, 12 insertions(+), 16 deletions(-) diff --git a/.config/git/config b/.config/git/config index 1ce04289..60f96de8 100644 --- a/.config/git/config +++ b/.config/git/config @@ -39,7 +39,7 @@ defaultBranch = main [core] - editor = helix + editor = hx pager = delta [delta] diff --git a/.config/nushell/env.nu b/.config/nushell/env.nu index 99f76ad2..6b4658a3 100644 --- a/.config/nushell/env.nu +++ b/.config/nushell/env.nu @@ -102,8 +102,8 @@ let-env MUJOCO_BIN = $"($env.HOME)/.mujoco/mujoco210/bin" let-env VIMINIT = 'let $MYVIMRC="$XDG_CONFIG_HOME/vim/vimrc" | source $MYVIMRC' # changes the editor in the terminal, to edit long commands. -let-env EDITOR = 'helix' -let-env VISAL = 'helix' +let-env EDITOR = 'hx' +let-env VISAL = 'hx' ### SET MANPAGER ### Uncomment only one of these! diff --git a/.config/nushell/scripts/aliases.nu b/.config/nushell/scripts/aliases.nu index b5464f75..3eb5f47e 100644 --- a/.config/nushell/scripts/aliases.nu +++ b/.config/nushell/scripts/aliases.nu @@ -13,7 +13,6 @@ alias mv = mv --verbose # misc alias cb = ^cbonsai --infinite --live --base=1 --wait=2 --time=10 -alias hx = helix # credit to @azzamsa # https://discord.com/channels/601130461678272522/988303282931912704/1026019048254873651 diff --git a/pkgs.toml b/pkgs.toml index 4908e36d..52019875 100644 --- a/pkgs.toml +++ b/pkgs.toml @@ -682,10 +682,6 @@ version = "5.2.0-1" package = "harfbuzz-icu" version = "5.2.0-1" -[[pkgs.pacman.all]] -package = "helix" -version = "22.08.1-1" - [[pkgs.pacman.all]] package = "hicolor-icon-theme" version = "0.17-2" @@ -3994,10 +3990,6 @@ version = "1:0.3.58-1" package = "gzip" version = "1.12-1" -[[pkgs.pacman.explicit]] -package = "helix" -version = "22.08.1-1" - [[pkgs.pacman.explicit]] package = "intel-media-driver" version = "22.4.4-2" @@ -4806,10 +4798,6 @@ version = "1:0.3.58-1" package = "gzip" version = "1.12-1" -[[pkgs.pacman.native]] -package = "helix" -version = "22.08.1-1" - [[pkgs.pacman.native]] package = "intel-media-driver" version = "22.4.4-2" @@ -5581,6 +5569,11 @@ version = "4.8.4" package = "Werkzeug" version = "2.2.2" +[[pkgs.python.pipx]] +package = "python-lsp-server" +python = "3.10.7" +version = "1.5.0" + [[pkgs.python.pipx]] package = "virtualenv" python = "3.10.7" @@ -5593,6 +5586,10 @@ version = "1.15.0" package = "heh" version = "0.2.0" +[[pkgs.rust.cargo]] +package = "helix-term" +version = "0.6.0 (/home/amtoine/ghq/github.com/helix-editor/helix/helix-term)" + [[pkgs.rust.cargo]] package = "toipe" version = "0.4.1" From f16352d78a83fa053e320aca99539234e3e7fa0f Mon Sep 17 00:00:00 2001 From: amtoine <44101798+amtoine@users.noreply.github.com> Date: Mon, 17 Oct 2022 19:34:34 +0200 Subject: [PATCH 08/10] use hx as the default editor in bash --- .bashrc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.bashrc b/.bashrc index 7aebb68b..783be8ba 100644 --- a/.bashrc +++ b/.bashrc @@ -208,8 +208,8 @@ export PATH="$HOME/.local/bin:$EMACS_HOME/bin:$CARGO_HOME/bin:$PATH" export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$MUJOCO_BIN" # changes the editor in the terminal, to edit long commands. -export EDITOR='helix' -export VISAL='helix' +export EDITOR='hx' +export VISAL='hx' set -o vi ### SET MANPAGER From 30ab0f35ad2cb2a0540c06e50e4c9795e92d989c Mon Sep 17 00:00:00 2001 From: amtoine <44101798+amtoine@users.noreply.github.com> Date: Wed, 14 Dec 2022 17:32:25 +0100 Subject: [PATCH 09/10] change remaining `hx` to `helix` --- .config/git/config | 2 +- .config/nushell/env.nu | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.config/git/config b/.config/git/config index a46850bf..3f4187df 100644 --- a/.config/git/config +++ b/.config/git/config @@ -16,7 +16,7 @@ defaultBranch = main [core] - editor = hx + editor = helix pager = delta [delta] diff --git a/.config/nushell/env.nu b/.config/nushell/env.nu index 8674f184..5b18d91d 100644 --- a/.config/nushell/env.nu +++ b/.config/nushell/env.nu @@ -113,8 +113,8 @@ let-env MUJOCO_BIN = $"($env.HOME)/.mujoco/mujoco210/bin" let-env VIMINIT = 'let $MYVIMRC="$XDG_CONFIG_HOME/vim/vimrc" | source $MYVIMRC' # changes the editor in the terminal, to edit long commands. -let-env EDITOR = 'hx' -let-env VISAL = 'hx' +let-env EDITOR = 'helix' +let-env VISAL = 'helix' ### SET MANPAGER ### Uncomment only one of these! From fde352e2739a2027d01bb65c6f8cb23f28bd70b6 Mon Sep 17 00:00:00 2001 From: amtoine <44101798+amtoine@users.noreply.github.com> Date: Wed, 14 Dec 2022 17:33:03 +0100 Subject: [PATCH 10/10] do the same in bashrc --- .bashrc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.bashrc b/.bashrc index 4ffc18f4..2ba03308 100644 --- a/.bashrc +++ b/.bashrc @@ -198,8 +198,8 @@ export PATH="$HOME/.local/bin:$EMACS_HOME/bin:$CARGO_HOME/bin:$PATH" export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$MUJOCO_BIN" # changes the editor in the terminal, to edit long commands. -export EDITOR='hx' -export VISAL='hx' +export EDITOR='helix' +export VISAL='helix' set -o vi ### SET MANPAGER