Merged options.lua into app.nix
This commit is contained in:
parent
f3aad89088
commit
935c75b459
2 changed files with 46 additions and 64 deletions
|
|
@ -39,11 +39,53 @@
|
||||||
viAlias = true;
|
viAlias = true;
|
||||||
vimAlias = true;
|
vimAlias = true;
|
||||||
vimdiffAlias = true;
|
vimdiffAlias = true;
|
||||||
|
|
||||||
|
globals = {
|
||||||
|
mapleader = " ";
|
||||||
|
maplocalleader = " ";
|
||||||
|
rust_recommended_style = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
options = {
|
||||||
|
list = true;
|
||||||
|
updatetime = 750;
|
||||||
|
|
||||||
|
tabstop = 2;
|
||||||
|
softtabstop = 0;
|
||||||
|
shiftwidth = 2;
|
||||||
|
smarttab = true;
|
||||||
|
expandtab = true;
|
||||||
|
|
||||||
|
colorcolumn = "81";
|
||||||
|
showmatch = true;
|
||||||
|
number = true;
|
||||||
|
relativenumber = true;
|
||||||
|
|
||||||
|
swapfile = false;
|
||||||
|
backup = false;
|
||||||
|
undofile = true;
|
||||||
|
undodir = "${config.xdg.configHome}/nvim/undodir";
|
||||||
|
|
||||||
|
smartcase = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
keymaps = [
|
||||||
|
{
|
||||||
|
key = "<leader>d";
|
||||||
|
mode = "n";
|
||||||
|
action = "vim.diagnostic.open_float()";
|
||||||
|
}
|
||||||
|
# -- Easy Split Navigation
|
||||||
|
# -- nnoremap <C-J> <C-W><C-J>
|
||||||
|
# -- nnoremap <C-K> <C-W><C-K>
|
||||||
|
# -- nnoremap <C-L> <C-W><C-L>
|
||||||
|
# -- nnoremap <C-H> <C-W><C-H>
|
||||||
|
#
|
||||||
|
# -- Easy copy and pasting to external programs
|
||||||
|
# -- map <C-y> "+yy
|
||||||
|
# -- map <C-p> "+P
|
||||||
|
];
|
||||||
};
|
};
|
||||||
# extraLuaConfig = ''
|
|
||||||
# ${builtins.readFile ./options.lua}
|
|
||||||
# '';
|
|
||||||
# vim.g.rust_recommended_style = 0
|
|
||||||
|
|
||||||
programs.nixvim.colorschemes = with config.neovim.themes; {
|
programs.nixvim.colorschemes = with config.neovim.themes; {
|
||||||
catppuccin = lib.mkIf catppuccin.enable {
|
catppuccin = lib.mkIf catppuccin.enable {
|
||||||
|
|
|
||||||
|
|
@ -1,60 +0,0 @@
|
||||||
-- Globals
|
|
||||||
vim.g.mapleader = ' '
|
|
||||||
vim.g.maplocalleader = ' '
|
|
||||||
vim.opt.list = true
|
|
||||||
vim.bo.filetype = "on"
|
|
||||||
vim.opt.updatetime = 300
|
|
||||||
|
|
||||||
-- Indentations
|
|
||||||
vim.opt.tabstop = 2
|
|
||||||
vim.opt.softtabstop = 0
|
|
||||||
vim.opt.shiftwidth = 2
|
|
||||||
vim.opt.smarttab = true
|
|
||||||
vim.opt.expandtab = true
|
|
||||||
|
|
||||||
-- Style
|
|
||||||
vim.opt.colorcolumn = "80"
|
|
||||||
vim.opt.showmatch = true
|
|
||||||
vim.opt.number = true
|
|
||||||
vim.opt.relativenumber = true
|
|
||||||
|
|
||||||
-- Easy Split Navigation
|
|
||||||
-- nnoremap <C-J> <C-W><C-J>
|
|
||||||
-- nnoremap <C-K> <C-W><C-K>
|
|
||||||
-- nnoremap <C-L> <C-W><C-L>
|
|
||||||
-- nnoremap <C-H> <C-W><C-H>
|
|
||||||
|
|
||||||
-- Searching
|
|
||||||
vim.opt.smartcase = true
|
|
||||||
|
|
||||||
-- Backups
|
|
||||||
vim.opt.swapfile = false
|
|
||||||
vim.opt.backup = false
|
|
||||||
vim.opt.undofile = true
|
|
||||||
vim.opt.undodir = '/home/pan/.config/nvim/undodir'
|
|
||||||
|
|
||||||
-- Error viewing
|
|
||||||
vim.keymap.set('n', '<Leader>d', function() vim.diagnostic.open_float() end)
|
|
||||||
|
|
||||||
-- Easy copy and pasting to external programs
|
|
||||||
-- map <C-y> "+yy
|
|
||||||
-- map <C-p> "+P
|
|
||||||
|
|
||||||
-- autocmd BufRead,BufNewFile *.md call WritingMode()
|
|
||||||
-- autocmd BufRead,BufNewFile *.tex call WritingMode()
|
|
||||||
-- autocmd BufRead,BufNewFile *.svx call WritingMode()
|
|
||||||
|
|
||||||
-- autocmd BufRead,BufNewFile *.py call PythonMode()
|
|
||||||
|
|
||||||
-- function! WritingMode()
|
|
||||||
-- setlocal textwidth=80
|
|
||||||
-- setlocal wrap linebreak nolist
|
|
||||||
-- setlocal whichwrap+=<,>,h,l
|
|
||||||
-- nnoremap j gj
|
|
||||||
-- nnoremap k gk
|
|
||||||
-- setlocal spell spelllang=en_us
|
|
||||||
-- endfunction
|
|
||||||
-- function! PythonMode()
|
|
||||||
-- setlocal foldmethod=indent
|
|
||||||
-- setlocal foldlevel=99
|
|
||||||
-- endfunction
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue