eglot rust analyzer and other stuff
This commit is contained in:
parent
6bb60bb4ed
commit
dcdd2c0ca2
5 changed files with 52 additions and 52 deletions
54
flake.lock
54
flake.lock
|
|
@ -20,11 +20,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1750372185,
|
||||
"narHash": "sha256-lVBKxd9dsZOH1fA6kSE5WNnt8e+09fN+NL/Q3BjTWHY=",
|
||||
"lastModified": 1751569683,
|
||||
"narHash": "sha256-PoQcCYTiN52PanxgWBN4Tqet1x4PCk6KtjaHNjELH88=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "aquamarine",
|
||||
"rev": "7cef49d261cbbe537e8cb662485e76d29ac4cbca",
|
||||
"rev": "c0c56dde3e471030edb135425a82107cf0057c6f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -149,11 +149,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1749154018,
|
||||
"narHash": "sha256-gjN3j7joRvT3a8Zgcylnd4NFsnXeDBumqiu4HmY1RIg=",
|
||||
"lastModified": 1751468302,
|
||||
"narHash": "sha256-tWosziZTT039x6PgEZUhzGlV8oLvdDmIgKTE8ESMaEA=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "7aae0ee71a17b19708b93b3ed448a1a0952bf111",
|
||||
"rev": "501cfec8277f931a9c9af9f23d3105c537faeafe",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -208,11 +208,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1750371717,
|
||||
"narHash": "sha256-cNP+bVq8m5x2Rl6MTjwfQLCdwbVmKvTH7yqVc1SpiJM=",
|
||||
"lastModified": 1750621377,
|
||||
"narHash": "sha256-8u6b5oAdX0rCuoR8wFenajBRmI+mzbpNig6hSCuWUzE=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprgraphics",
|
||||
"rev": "15c6f8f3a567fec9a0f732cd310a7ff456deef88",
|
||||
"rev": "b3d628d01693fb9bb0a6690cd4e7b80abda04310",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -237,11 +237,11 @@
|
|||
"xdph": "xdph"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1750515748,
|
||||
"narHash": "sha256-8xDci/Xb/u2FczbO9xwIs3vS8N81O3o38F3XGgoizNI=",
|
||||
"lastModified": 1751633026,
|
||||
"narHash": "sha256-36YOErrM/BB8J/IpqgAg7CNZfAlfU7Mng1S9Y9OFOmc=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "Hyprland",
|
||||
"rev": "238887473866a63c0fd70ead614f37ac86333e28",
|
||||
"rev": "9b51d73a1e22c86e8d6ec78750e622da9242e32f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -384,11 +384,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1750371096,
|
||||
"narHash": "sha256-JB1IeJ41y7kWc/dPGV6RMcCUM0Xj2NEK26A2Ap7EM9c=",
|
||||
"lastModified": 1751061882,
|
||||
"narHash": "sha256-g9n8Vrbx+2JYM170P9BbvGHN39Wlkr4U+V2WLHQsXL8=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprutils",
|
||||
"rev": "38f3a211657ce82a1123bf19402199b67a410f08",
|
||||
"rev": "4737241eaf8a1e51671a2a088518071f9a265cf4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -449,11 +449,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1750325256,
|
||||
"narHash": "sha256-vvlxGz/waqJ3TGqM/iqXbnEc7/R1qnEXmaBiPaQ1RE0=",
|
||||
"lastModified": 1751313918,
|
||||
"narHash": "sha256-HsJM3XLa43WpG+665aGEh8iS8AfEwOIQWk3Mke3e7nk=",
|
||||
"owner": "LnL7",
|
||||
"repo": "nix-darwin",
|
||||
"rev": "0d71cbf88d63e938b37b85b3bf8b238bcf7b39b9",
|
||||
"rev": "e04a388232d9a6ba56967ce5b53a8a6f713cdfcf",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -514,11 +514,11 @@
|
|||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1750365781,
|
||||
"narHash": "sha256-XE/lFNhz5lsriMm/yjXkvSZz5DfvKJLUjsS6pP8EC50=",
|
||||
"lastModified": 1751011381,
|
||||
"narHash": "sha256-krGXKxvkBhnrSC/kGBmg5MyupUUT5R6IBCLEzx9jhMM=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "08f22084e6085d19bcfb4be30d1ca76ecb96fe54",
|
||||
"rev": "30e2e2857ba47844aa71991daa6ed1fc678bcbb7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -530,11 +530,11 @@
|
|||
},
|
||||
"nixpkgs_3": {
|
||||
"locked": {
|
||||
"lastModified": 1750400657,
|
||||
"narHash": "sha256-3vkjFnxCOP6vm5Pm13wC/Zy6/VYgei/I/2DWgW4RFeA=",
|
||||
"lastModified": 1751479989,
|
||||
"narHash": "sha256-M5KgdpVBVcW4HRVq9/OSRbrxlwsQ1ogEKqnvzsClDqU=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "b2485d56967598da068b5a6946dadda8bfcbcd37",
|
||||
"rev": "34627c90f062da515ea358360f448da57769236e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -575,11 +575,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1749636823,
|
||||
"narHash": "sha256-WUaIlOlPLyPgz9be7fqWJA5iG6rHcGRtLERSCfUDne4=",
|
||||
"lastModified": 1750779888,
|
||||
"narHash": "sha256-wibppH3g/E2lxU43ZQHC5yA/7kIKLGxVEnsnVK1BtRg=",
|
||||
"owner": "cachix",
|
||||
"repo": "git-hooks.nix",
|
||||
"rev": "623c56286de5a3193aa38891a6991b28f9bab056",
|
||||
"rev": "16ec914f6fb6f599ce988427d9d94efddf25fe6d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
|||
6
home.nix
6
home.nix
|
|
@ -55,6 +55,7 @@ in
|
|||
lua
|
||||
sageWithDoc
|
||||
zls
|
||||
rustup
|
||||
|
||||
# might as well use it consistently
|
||||
haskell-language-server
|
||||
|
|
@ -108,7 +109,6 @@ in
|
|||
# ];
|
||||
# }))
|
||||
pkg-config
|
||||
rustup
|
||||
podman
|
||||
wget
|
||||
] else [
|
||||
|
|
@ -134,10 +134,6 @@ in
|
|||
libsForQt5.khotkeys
|
||||
libsForQt5.kio
|
||||
helm
|
||||
cargo
|
||||
clippy
|
||||
rustc
|
||||
rustfmt
|
||||
inotify-tools
|
||||
]);
|
||||
|
||||
|
|
|
|||
38
init.el.nix
38
init.el.nix
|
|
@ -219,12 +219,6 @@ If the new path's directories does not exist, create them."
|
|||
;; Nice line wrapping when working with text
|
||||
(add-hook 'text-mode-hook 'visual-line-mode)
|
||||
|
||||
;; mix format
|
||||
(add-hook 'after-save-hook
|
||||
'(lambda ()
|
||||
(when (eq major-mode 'elixir-ts-mode)
|
||||
(shell-command-to-string (format "mix format %s" (buffer-file-name))))))
|
||||
|
||||
;; Modes to highlight the current line with
|
||||
(let ((hl-line-hooks '(text-mode-hook prog-mode-hook)))
|
||||
(mapc (lambda (hook) (add-hook hook 'hl-line-mode)) hl-line-hooks))
|
||||
|
|
@ -489,11 +483,14 @@ If the new path's directories does not exist, create them."
|
|||
(json-mode . json-ts-mode)
|
||||
(css-mode . css-ts-mode)
|
||||
(python-mode . python-ts-mode)
|
||||
(elixir-mode . elixir-ts-mode)))
|
||||
(elixir-mode . elixir-ts-mode)
|
||||
(rust-mode . rust-ts-mode)))
|
||||
(add-to-list 'auto-mode-alist
|
||||
'("\\.ex\\'" . elixir-mode))
|
||||
(add-to-list 'auto-mode-alist
|
||||
'("\\.exs\\'" . elixir-mode))
|
||||
(add-to-list 'auto-mode-alist
|
||||
'("\\.rs\\'" . rust-mode))
|
||||
|
||||
:hook
|
||||
;; Auto parenthesis matching
|
||||
|
|
@ -538,25 +535,22 @@ If the new path's directories does not exist, create them."
|
|||
(use-package eglot
|
||||
;; no :ensure t here because it's built-in
|
||||
|
||||
;; Configure hooks to automatically turn-on eglot for selected modes
|
||||
:hook
|
||||
; (((python-mode ruby-mode) . eglot))
|
||||
((elixir-ts-mode . eglot-ensure)
|
||||
(rust-mode . eglot-ensure))
|
||||
|
||||
:custom
|
||||
;; let's try a higher idle time, elixir-ls is a bit finicky
|
||||
(eglot-send-changes-idle-time 0.5)
|
||||
(rust-mode . eglot-ensure)
|
||||
(before-save . eglot-format)
|
||||
|
||||
:config
|
||||
(fset #'jsonrpc--log-event #'ignore) ; massive perf boost---don't log every event
|
||||
; (fset #'jsonrpc--log-event #'ignore) ; massive perf boost---don't log every event
|
||||
|
||||
;; Sometimes you need to tell Eglot where to find the language server
|
||||
(add-to-list 'eglot-server-programs
|
||||
'(elixir-ts-mode "${pkgs.elixir-ls}/bin/elixir-ls"))
|
||||
; i could nixify the rust-analyzer bin path buuuut
|
||||
(add-to-list 'eglot-server-programs
|
||||
'((rust-ts-mode rust-mode) .
|
||||
("rust-analyzer" :initializationOptions (:check (:command "clippy")))))
|
||||
("rust-analyzer" :initializationOptions
|
||||
(:check (:command "clippy"
|
||||
:extraArgs ["--" "-W" "clippy::pedantic"])))))
|
||||
)
|
||||
|
||||
; oorg
|
||||
|
|
@ -988,6 +982,16 @@ If the new path's directories does not exist, create them."
|
|||
|
||||
; haskell
|
||||
"hg" 'haskell-hoogle
|
||||
|
||||
; lsp (eglot)
|
||||
"la" 'eglot-code-actions
|
||||
"lf" 'eglot-code-action-quickfix
|
||||
"li" 'eglot-inlay-hints-mode
|
||||
"lh" 'eldoc
|
||||
"lr" 'eglot-rename
|
||||
"ld" 'xref-find-definitions
|
||||
"ln" 'imenu
|
||||
"lE" 'eglot
|
||||
))
|
||||
|
||||
(use-package evil-goggles
|
||||
|
|
|
|||
|
|
@ -1109,7 +1109,7 @@ color15 #ebdbb2
|
|||
|
||||
#: Advanced {{{
|
||||
|
||||
# shell fish
|
||||
shell nu
|
||||
|
||||
#: The shell program to execute. The default value of . means to use
|
||||
#: whatever shell is set as the default shell for the current user.
|
||||
|
|
|
|||
|
|
@ -129,8 +129,8 @@
|
|||
"ruby.format" = "prettier";
|
||||
"ruby.intellisense" = "rubyLocate";
|
||||
"rust-analyzer.server.path" = "${pkgs.rust-analyzer}/bin/rust-analyzer";
|
||||
"rust-analyzer.checkOnSave.command" = "clippy";
|
||||
"rust-analyzer.checkOnSave.extraArgs" = [ "--" "-W" "clippy::pedantic" ];
|
||||
"rust-analyzer.check.command" = "clippy";
|
||||
"rust-analyzer.check.extraArgs" = [ "--" "-W" "clippy::pedantic" ];
|
||||
"rust-analyzer.debug.openDebugPane" = true;
|
||||
"rust-analyzer.inlayHints.closureReturnTypeHints.enable" = "always";
|
||||
"rust-analyzer.inlayHints.lifetimeElisionHints.enable" = "always";
|
||||
|
|
|
|||
Loading…
Reference in a new issue