Refactor configs
This commit is contained in:
parent
97656f8e60
commit
0c8b07077e
7 changed files with 72 additions and 70 deletions
|
@ -1,7 +1,7 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
home-manager.users.mae = {
|
home-manager.users.mae = {
|
||||||
imports = [ ../profiles/git ../profiles/zsh ];
|
imports = [ ../profiles/git ../profiles/zsh ../profiles/neovim ];
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
arc-theme
|
arc-theme
|
||||||
];
|
];
|
||||||
|
|
|
@ -1,57 +0,0 @@
|
||||||
{ pkgs, ... }:
|
|
||||||
{
|
|
||||||
enable = true;
|
|
||||||
vimdiffAlias = true;
|
|
||||||
withNodeJs = true;
|
|
||||||
|
|
||||||
plugins = with pkgs.vimPlugins; [
|
|
||||||
{
|
|
||||||
plugin = coc-nvim;
|
|
||||||
config = ''
|
|
||||||
nmap <silent> <F2> <Plug>(coc-rename)
|
|
||||||
|
|
||||||
inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
|
|
||||||
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
|
|
||||||
|
|
||||||
" Remap <C-f> and <C-b> for scroll float windows/popups.
|
|
||||||
if has('nvim-0.4.0') || has('patch-8.2.0750')
|
|
||||||
nnoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? coc#float#scroll(1) : "\<C-f>"
|
|
||||||
nnoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? coc#float#scroll(0) : "\<C-b>"
|
|
||||||
inoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? "\<c-r>=coc#float#scroll(1)\<cr>" : "\<Right>"
|
|
||||||
inoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? "\<c-r>=coc#float#scroll(0)\<cr>" : "\<Left>"
|
|
||||||
vnoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? coc#float#scroll(1) : "\<C-f>"
|
|
||||||
vnoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? coc#float#scroll(0) : "\<C-b>"
|
|
||||||
endif
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
fzf-vim
|
|
||||||
{
|
|
||||||
plugin = iceberg-vim;
|
|
||||||
config = "colorscheme iceberg";
|
|
||||||
}
|
|
||||||
vim-sleuth
|
|
||||||
coc-json
|
|
||||||
coc-html
|
|
||||||
coc-tsserver
|
|
||||||
neoformat
|
|
||||||
undotree
|
|
||||||
{
|
|
||||||
plugin = vim-jsdoc;
|
|
||||||
config = ''
|
|
||||||
let g:jsdoc_formatter = "tsdoc"
|
|
||||||
let g:typescript_indent_disable = 1
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
];
|
|
||||||
extraConfig = ''
|
|
||||||
set background=dark
|
|
||||||
set termguicolors
|
|
||||||
|
|
||||||
set ic
|
|
||||||
set number
|
|
||||||
set autoindent
|
|
||||||
|
|
||||||
set completeopt=menuone,noinsert,noselect
|
|
||||||
set shortmess+=c
|
|
||||||
'';
|
|
||||||
}
|
|
59
users/profiles/neovim/default.nix
Normal file
59
users/profiles/neovim/default.nix
Normal file
|
@ -0,0 +1,59 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
programs.zsh = {
|
||||||
|
{
|
||||||
|
enable = true;
|
||||||
|
vimdiffAlias = true;
|
||||||
|
withNodeJs = true;
|
||||||
|
|
||||||
|
plugins = with pkgs.vimPlugins; [
|
||||||
|
{
|
||||||
|
plugin = coc-nvim;
|
||||||
|
config = ''
|
||||||
|
nmap <silent> <F2> <Plug>(coc-rename)
|
||||||
|
|
||||||
|
inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
|
||||||
|
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
|
||||||
|
|
||||||
|
" Remap <C-f> and <C-b> for scroll float windows/popups.
|
||||||
|
if has('nvim-0.4.0') || has('patch-8.2.0750')
|
||||||
|
nnoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? coc#float#scroll(1) : "\<C-f>"
|
||||||
|
nnoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? coc#float#scroll(0) : "\<C-b>"
|
||||||
|
inoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? "\<c-r>=coc#float#scroll(1)\<cr>" : "\<Right>"
|
||||||
|
inoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? "\<c-r>=coc#float#scroll(0)\<cr>" : "\<Left>"
|
||||||
|
vnoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? coc#float#scroll(1) : "\<C-f>"
|
||||||
|
vnoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? coc#float#scroll(0) : "\<C-b>"
|
||||||
|
endif
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
fzf-vim
|
||||||
|
{
|
||||||
|
plugin = iceberg-vim;
|
||||||
|
config = "colorscheme iceberg";
|
||||||
|
}
|
||||||
|
vim-sleuth
|
||||||
|
coc-json
|
||||||
|
coc-html
|
||||||
|
coc-tsserver
|
||||||
|
neoformat
|
||||||
|
undotree
|
||||||
|
{
|
||||||
|
plugin = vim-jsdoc;
|
||||||
|
config = ''
|
||||||
|
let g:jsdoc_formatter = "tsdoc"
|
||||||
|
let g:typescript_indent_disable = 1
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
];
|
||||||
|
extraConfig = ''
|
||||||
|
set background=dark
|
||||||
|
set termguicolors
|
||||||
|
|
||||||
|
set ic
|
||||||
|
set number
|
||||||
|
set autoindent
|
||||||
|
|
||||||
|
set completeopt=menuone,noinsert,noselect
|
||||||
|
set shortmess+=c
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue