added stuff
This commit is contained in:
parent
6d31f5b5a1
commit
7d4f626b7d
907 changed files with 70990 additions and 0 deletions
7
nyx/hosts/gaea/system/programs/default.nix
Normal file
7
nyx/hosts/gaea/system/programs/default.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
imports = [
|
||||
./neovim
|
||||
|
||||
./git.nix
|
||||
];
|
||||
}
|
6
nyx/hosts/gaea/system/programs/git.nix
Normal file
6
nyx/hosts/gaea/system/programs/git.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
programs.git = {
|
||||
enable = true;
|
||||
lfs.enable = true;
|
||||
};
|
||||
}
|
71
nyx/hosts/gaea/system/programs/neovim/config/init.vim
Normal file
71
nyx/hosts/gaea/system/programs/neovim/config/init.vim
Normal file
|
@ -0,0 +1,71 @@
|
|||
"vi:filetype=vim
|
||||
|
||||
" add ~/.vim to the beginning of the runtimepath
|
||||
set runtimepath^=~/.vim
|
||||
|
||||
" set the packpath to the runtimepath
|
||||
let &packpath = &runtimepath
|
||||
|
||||
" for plugins to load correctly
|
||||
filetype plugin indent on
|
||||
|
||||
" don't try to be vi compatible
|
||||
set nocompatible
|
||||
|
||||
" use system clipboard
|
||||
set clipboard+=unnamedplus
|
||||
|
||||
" syntax highlighting
|
||||
syntax enable
|
||||
|
||||
" display line numbers
|
||||
set number relativenumber
|
||||
|
||||
" enable mouse support in all modes
|
||||
set mouse=a
|
||||
|
||||
" set indentation to spaces instead of tabs
|
||||
set noexpandtab
|
||||
|
||||
" number of spaces to use for each step of (auto)indent
|
||||
set shiftwidth=2
|
||||
|
||||
" number of spaces that a <Tab> in the file counts for
|
||||
set tabstop=2
|
||||
|
||||
" C-style indenting
|
||||
set cindent
|
||||
|
||||
" 'smart' indenting
|
||||
set smartindent
|
||||
|
||||
" set the indent of new lines
|
||||
set autoindent
|
||||
|
||||
" set the folding method based on syntax
|
||||
set foldmethod=syntax
|
||||
|
||||
|
||||
" spaces instead of tabs for indentation
|
||||
set expandtab
|
||||
|
||||
" 'smart' tabs that respects 'shiftwidth' for indentation
|
||||
set smarttab
|
||||
|
||||
" number of spaces a <Tab> in the file counts for
|
||||
set tabstop=4
|
||||
|
||||
" number of spaces to use for each step of (auto)indent
|
||||
set shiftwidth=0
|
||||
|
||||
" define backspace behavior in insert mode:
|
||||
" - 'indent': allows backspace to delete auto-indentation at the start of a line
|
||||
" - 'eol': enables backspace to delete the end-of-line character, acting as line deletion
|
||||
" - 'start': allows backspace to delete past the start of insert or typeahead
|
||||
set backspace=indent,eol,start
|
||||
|
||||
|
||||
" spell Checking
|
||||
set spelllang=en " spell check langs
|
||||
set spellsuggest=best,9 " suggestions for spelling corrections
|
||||
|
9
nyx/hosts/gaea/system/programs/neovim/config/maps.vim
Normal file
9
nyx/hosts/gaea/system/programs/neovim/config/maps.vim
Normal file
|
@ -0,0 +1,9 @@
|
|||
" map key <F2> to toggle between hiding/showing current line
|
||||
nmap <F2> zA
|
||||
|
||||
" map key <F3> to toggle between reducing/enlarging fold level
|
||||
nmap <F3> zR
|
||||
|
||||
" map key <F4> to fold everything except the cursor line
|
||||
nmap <F4> zM
|
||||
|
16
nyx/hosts/gaea/system/programs/neovim/config/plugins.vim
Normal file
16
nyx/hosts/gaea/system/programs/neovim/config/plugins.vim
Normal file
|
@ -0,0 +1,16 @@
|
|||
" customize label for vim-sneak
|
||||
let g:sneak#label = 1
|
||||
|
||||
" Toggle spell checking in normal mode
|
||||
nnoremap <silent> <F3> :set spell!<CR>
|
||||
|
||||
" Toggle spell checking in insert mode
|
||||
inoremap <silent> <F3> <C-O>:set spell!<CR>
|
||||
|
||||
lua << EOF
|
||||
require('nvim-treesitter.configs').setup {
|
||||
highlight = {
|
||||
enable = true
|
||||
}
|
||||
}
|
||||
EOF
|
73
nyx/hosts/gaea/system/programs/neovim/default.nix
Normal file
73
nyx/hosts/gaea/system/programs/neovim/default.nix
Normal file
|
@ -0,0 +1,73 @@
|
|||
{pkgs, ...}: let
|
||||
inherit (builtins) readFile;
|
||||
in {
|
||||
programs = {
|
||||
neovim = {
|
||||
enable = true;
|
||||
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
defaultEditor = true;
|
||||
|
||||
configure = {
|
||||
customRC = ''
|
||||
" -- init --
|
||||
${readFile ./config/init.vim}
|
||||
" -- mappings --
|
||||
${readFile ./config/maps.vim}
|
||||
" -- plugin configs --
|
||||
${readFile ./config/plugins.vim}
|
||||
'';
|
||||
|
||||
packages.myVimPackage = with pkgs.vimPlugins; {
|
||||
start = [
|
||||
# general utils
|
||||
direnv-vim # direnv for vim
|
||||
dressing-nvim # better UI components
|
||||
|
||||
leap-nvim # navigation
|
||||
lualine-nvim # statusline
|
||||
tabular # align text according to regexp
|
||||
undotree # undo history
|
||||
vim-css-color # highlight CSS colors
|
||||
vim-signature # marks on signcolumn
|
||||
which-key-nvim # mapping manager and cheatsheet
|
||||
vim-sneak
|
||||
|
||||
# completion
|
||||
nvim-cmp
|
||||
cmp-buffer
|
||||
cmp-cmdline
|
||||
cmp-nvim-lsp
|
||||
cmp-path
|
||||
cmp_luasnip
|
||||
|
||||
comment-nvim
|
||||
todo-comments-nvim
|
||||
|
||||
luasnip
|
||||
friendly-snippets
|
||||
|
||||
nvim-lspconfig
|
||||
nvim-lint
|
||||
fidget-nvim
|
||||
aerial-nvim
|
||||
|
||||
telescope-nvim # list of files interface
|
||||
telescope-file-browser-nvim
|
||||
telescope-fzy-native-nvim
|
||||
|
||||
vim-fugitive # git in vim
|
||||
gitsigns-nvim
|
||||
|
||||
targets-vim # text objects
|
||||
vim-surround
|
||||
vim-expand-region
|
||||
|
||||
nvim-treesitter.withAllGrammars # better highlighting
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue