From 948b28d364c7ac5cad579fb585c7a7967c4770e3 Mon Sep 17 00:00:00 2001 From: Joe Frikker Date: Thu, 23 May 2024 09:19:04 -0400 Subject: [PATCH] helix etc. --- helix/config.toml | 26 ++++++++++++++++++++++ helix/languages.toml | 45 ++++++++++++++++++++++++++++++++++++++ home-manager/home-tmux.nix | 14 ++++++------ nixpkgs/overlays.nix | 19 ++++++++-------- 4 files changed, 88 insertions(+), 16 deletions(-) create mode 100644 helix/config.toml create mode 100644 helix/languages.toml diff --git a/helix/config.toml b/helix/config.toml new file mode 100644 index 0000000..376d4a5 --- /dev/null +++ b/helix/config.toml @@ -0,0 +1,26 @@ +theme = "catppuccin_frappe" + +[editor] +auto-format = false +auto-save = true +# completion-replace = true +cursorline = true +idle-timeout = 0 +rulers = [100] +text-width = 100 + +[editor.lsp] +goto-reference-include-declaration = false + +[editor.cursor-shape] +insert = "bar" + +[editor.smart-tab] +supersede-menu = true + +[keys.normal.space] +space = "file_picker" +"," = "buffer_picker" + +[editor.whitespace.render] +newline = "all" diff --git a/helix/languages.toml b/helix/languages.toml new file mode 100644 index 0000000..43315a5 --- /dev/null +++ b/helix/languages.toml @@ -0,0 +1,45 @@ +[language-server.eslint] +args = ["--stdio"] +command = "vscode-eslint-language-server" + +[language-server.eslint.config] +# format = true +nodePath = "" +# onIgnoredFiles = "off" +# packageManager = "yarn" +quiet = false +rulesCustomizations = [] +run = "onType" +# useESLintClass = false +validate = "on" +codeAction = { disableRuleComment = { enable = true, location = "separateLine" }, showDocumentation = { enable = true } } +# codeActionsOnSave = { mode = "all" } +experimental = {} +problems = { shortenToSingleLine = false } +# workingDirectory = { mode = "auto" } + +# [language-server.jdtls] +# args = ["--jvm-arg=-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=1044"] + +[language-server.jdtls.config.java.autobuild] +enabled = true + +[language-server.jdtls.config.java.completion] +maxResults = 1000 + +[language-server.jdtls.config.java.format.settings] +url = "https://raw.githubusercontent.com/google/styleguide/gh-pages/eclipse-java-google-style.xml" + +[[language]] +name = "typescript" +language-servers = [ "typescript-language-server", "eslint" ] +indent = { tab-width = 4, unit = " " } + +[[language]] +name = "tsx" +language-servers = [ "typescript-language-server", "eslint" ] +indent = { tab-width = 4, unit = " " } + +[[language]] +name = "java" +indent = { tab-width = 4, unit = " " } diff --git a/home-manager/home-tmux.nix b/home-manager/home-tmux.nix index f72dc9b..a890e43 100644 --- a/home-manager/home-tmux.nix +++ b/home-manager/home-tmux.nix @@ -14,17 +14,17 @@ pkgs: { set -g @catppuccin_window_default_text "#W" set -g @catppuccin_window_current_text "#W"''; } - { - plugin = pkgs.tmuxPlugins.tmux-thumbs; - extraConfig = '' -set -g @thumbs-unique enabled - ''; - } +# { +# plugin = pkgs.tmuxPlugins.tmux-thumbs; +# extraConfig = '' +# set -g @thumbs-unique enabled +# ''; +# } ]; shell = pkgs.zsh + "/bin/zsh"; shortcut = "Space"; tmuxinator.enable = true; - terminal = "screen-256color"; + terminal = "xterm-256color"; extraConfig = '' bind-key -T copy-mode-vi 'v' send -X begin-selection bind-key -T copy-mode-vi 'y' send -X copy-selection-and-cancel diff --git a/nixpkgs/overlays.nix b/nixpkgs/overlays.nix index eb82d2a..8a81852 100644 --- a/nixpkgs/overlays.nix +++ b/nixpkgs/overlays.nix @@ -4,24 +4,25 @@ # { # helix = prev.rustPlatform.buildRustPackage rec { # pname = "helix"; -# version = "24.03"; -# +# version = "master"; + # # This release tarball includes source code for the tree-sitter grammars, # # which is not ordinarily part of the repository. # src = prev.fetchzip { -# url = "https://github.com/helix-editor/helix/releases/download/${version}/helix-${version}-source.tar.xz"; -# hash = "sha256-1myVGFBwdLguZDPo1jrth/q2i5rn5R2+BVKIkCCUalc="; +# # url = "https://github.com/helix-editor/helix/releases/download/${version}/helix-${version}-source.tar.xz"; +# url = "https://github.com/helix-editor/helix/archive/109f53fb60f1b126c4c9afd97dd75972725d04ac.zip"; +# hash = "sha256-WzxaZ+X5HGen81EWVi0dirMzH4xSh4hV1flXSLl0P1k="; # stripRoot = false; # }; -# + # cargoHash = "sha256-THzPUVcmboVJHu3rJ6rev3GrkNilZRMlitCx7M1+HBE="; -# + # nativeBuildInputs = [ prev.git prev.installShellFiles prev.makeWrapper ]; -# + # postInstall = '' # # not needed at runtime # rm -r runtime/grammars/sources -# + # mkdir -p $out/lib # cp -r runtime $out/lib # installShellCompletion contrib/completion/hx.{bash,fish,zsh} @@ -32,7 +33,7 @@ # postFixup = '' # wrapProgram $out/bin/hx --set HELIX_RUNTIME $out/lib/runtime # ''; -# + # meta = with prev.lib; { # description = "A post-modern modal text editor"; # homepage = "https://helix-editor.com";