This repository has been archived by the owner on Aug 5, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
editors/neovim: post-refactor cleanup
- Loading branch information
Showing
6 changed files
with
96 additions
and
30 deletions.
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
homes/notashelf/programs/terminal/editors/neovim/.stylua.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
column_width = 100 | ||
line_endings = "Unix" | ||
indent_type = "Spaces" | ||
indent_width = 4 | ||
quote_style = "AutoPreferSingle" | ||
call_parentheses = "Always" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
homes/notashelf/programs/terminal/editors/neovim/lua/misc.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
vim.cmd.aunmenu [[PopUp.How-to\ disable\ mouse]] | ||
vim.cmd.aunmenu [[PopUp.-1-]] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
homes/notashelf/programs/terminal/editors/neovim/wrapper.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
config, | ||
pkgs, | ||
lib, | ||
... | ||
}: { | ||
xdg.desktopEntries."Neovim" = lib.mkForce { | ||
name = "Neovim"; | ||
type = "Application"; | ||
mimeType = ["text/plain"]; | ||
|
||
icon = builtins.fetchurl { | ||
url = "https://raw.githubusercontent.com/NotAShelf/neovim-flake/main/assets/neovim-flake-logo-work.svg"; | ||
sha256 = "19n7n9xafyak35pkn4cww0s5db2cr97yz78w5ppbcp9jvxw6yyz3"; | ||
}; | ||
|
||
exec = let | ||
wezterm = lib.getExe config.programs.wezterm.package; | ||
direnv = lib.getExe pkgs.direnv; | ||
in "${pkgs.writeShellScript "wezterm-neovim" '' | ||
# define target filename | ||
filename="$(readlink -f "$1")" | ||
# get the directory target file is in | ||
dirname="$(dirname "$filename")" | ||
# launch a wezterm instance with direnv and nvim | ||
${wezterm} -e --cwd "$dirname" -- ${lib.getExe pkgs.zsh} -c "${direnv} exec . nvim '$filename'" | ||
''} %f"; | ||
}; | ||
} |