-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d6fd8eb
commit 573b34d
Showing
7 changed files
with
319 additions
and
302 deletions.
There are no files selected for viewing
61 changes: 61 additions & 0 deletions
61
system/with/user/with/program/neovim/auto-commands/default.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,61 @@ | ||
{...}: { | ||
autoCommands = [ | ||
{ | ||
event = [ | ||
"FileType" | ||
]; | ||
pattern = [ | ||
"qf" | ||
"help" | ||
"man" | ||
"lspinfo" | ||
]; | ||
callback = { | ||
__raw = '' | ||
function() | ||
vim.cmd([[ | ||
set buflisted | ||
wincmd o | ||
]]) | ||
end | ||
''; | ||
}; | ||
} | ||
{ | ||
event = [ | ||
"FileType" | ||
]; | ||
pattern = [ | ||
"md" | ||
"markdown" | ||
"txt" | ||
"gitcommit" | ||
]; | ||
callback = { | ||
__raw = '' | ||
function() | ||
vim.opt_local.wrap = true | ||
vim.keymap.set({'n', 'v'}, 'j', 'gj', {buffer = true}) | ||
vim.keymap.set({'n', 'v'}, 'k', 'gk', {buffer = true}) | ||
end | ||
''; | ||
}; | ||
} | ||
{ | ||
event = ["BufRead"]; | ||
# TODO: Fine a real syntax highlighting solution for haxe | ||
pattern = ["*.hx"]; | ||
command = "set filetype=ts"; | ||
} | ||
{ | ||
event = ["TextYankPost"]; | ||
pattern = ["*"]; | ||
command = ''lua vim.highlight.on_yank({higroup="ActiveYank", timeout=300})''; | ||
} | ||
{ | ||
event = ["User"]; | ||
pattern = ["TelescopePreviewerLoaded"]; | ||
command = ''lua vim.wo.wrap = true''; | ||
} | ||
]; | ||
} |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ ... }: { | ||
{...}: { | ||
options = { | ||
background = "dark"; | ||
termguicolors = false; | ||
|
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
Oops, something went wrong.