mirror of
https://github.com/softinio/nix-config.git
synced 2025-10-19 03:26:40 -07:00
corrections and improvements to have all neovim lsp and completions working
This commit is contained in:
parent
f98fe01b0c
commit
7584b9ebfc
7 changed files with 130 additions and 31 deletions
34
programs/nixvim/autocommands.nix
Normal file
34
programs/nixvim/autocommands.nix
Normal file
|
@ -0,0 +1,34 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
programs.nixvim.autoCmd = [
|
||||
# Vertically center document when entering insert mode
|
||||
{
|
||||
event = "InsertEnter";
|
||||
command = "norm zz";
|
||||
}
|
||||
|
||||
# Open help in a vertical split
|
||||
{
|
||||
event = "FileType";
|
||||
pattern = "help";
|
||||
command = "wincmd L";
|
||||
}
|
||||
|
||||
# Enable spellcheck for some filetypes
|
||||
{
|
||||
event = "FileType";
|
||||
pattern = [
|
||||
"markdown"
|
||||
];
|
||||
command = "setlocal spell spelllang=en";
|
||||
}
|
||||
|
||||
# Set indentation for specific filetypes
|
||||
{
|
||||
event = "FileType";
|
||||
pattern = ["swift" "json" "lua" "nix"];
|
||||
command = "setlocal shiftwidth=2 tabstop=2 softtabstop=2 expandtab";
|
||||
}
|
||||
];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue