set basic options
This commit is contained in:
parent
3f44f068ae
commit
f06d946675
4 changed files with 60 additions and 1 deletions
|
@ -35,8 +35,62 @@ in {
|
|||
${config.extraLua}
|
||||
EOF_991fbac8c1efc440
|
||||
'';
|
||||
};
|
||||
|
||||
vim.opt = {
|
||||
# undo/backup directories
|
||||
undofile = true;
|
||||
backup = true;
|
||||
# tab settings
|
||||
tabstop = 4;
|
||||
softtabstop = 4;
|
||||
shiftwidth = 4;
|
||||
expandtab = true;
|
||||
matchpairs = "(:),{:},[:],<:>,「:」,『:』,【:】,“:”,‘:’,《:》,„:“,‚:‘,«:»,‹:›";
|
||||
number = true;
|
||||
relativenumber = true;
|
||||
ignorecase = true;
|
||||
smartcase = true;
|
||||
fileencoding = "utf-8";
|
||||
|
||||
linebreak = true;
|
||||
showbreak = "↪";
|
||||
wildmode = "list:longest";
|
||||
scrolloff = 3;
|
||||
mouse = "a";
|
||||
mousemodel = "popup";
|
||||
list = true;
|
||||
listchars = "tab:▸ ,extends:❯,precedes:❮,nbsp:␣";
|
||||
autowrite = true;
|
||||
shortmess = "filnxtToOFcSI";
|
||||
completeopt = "menu,preview,menuone";
|
||||
pumheight = 10;
|
||||
pumblend = 10;
|
||||
winblend = 0;
|
||||
complete = "kspell,.";
|
||||
spelllang = "en";
|
||||
spellsuggest = "best,9";
|
||||
shiftround = true;
|
||||
virtualedit = "block";
|
||||
formatoptions = "tcqjmM";
|
||||
tildeop = true;
|
||||
synmaxcol = 250;
|
||||
startofline = false;
|
||||
grepprg = "rg --vimgrep --no-heading --smart-case";
|
||||
grepformat = "%f:%l:%c:%m";
|
||||
termguicolors = true;
|
||||
guicursor = "n-v-c:block-Cursor/lCursor,i-ci-ve:ver25-Cursor2/lCursor2,r-cr:hor20,o:hor20";
|
||||
signcolumn = "yes:1";
|
||||
diffopt = "vertical,filler,closeoff,context:3,internal,indent-heuristic,algorithm:histogram";
|
||||
wrap = false;
|
||||
ruler = true;
|
||||
};
|
||||
|
||||
extraLuaModules = [
|
||||
"config.undodir"
|
||||
];
|
||||
|
||||
output.path.path = with pkgs; [ripgrep];
|
||||
};
|
||||
options.isDesktop = lib.options.mkEnableOption "desktop integration and LSP";
|
||||
options.extraLua = lib.options.mkOption {
|
||||
type = lib.types.lines;
|
||||
|
|
5
config/programs/vim/modules/lua/config/undodir.lua
Normal file
5
config/programs/vim/modules/lua/config/undodir.lua
Normal file
|
@ -0,0 +1,5 @@
|
|||
local home = os.getenv("HOME")
|
||||
|
||||
vim.opt.undodir = home .. "/.cache/nvim/undo-files//"
|
||||
vim.opt.directory = home .. "/.cache/nvim/swap-files//"
|
||||
vim.opt.backupdir = home .. "/.cache/nvim/backup-files//"
|
Loading…
Reference in a new issue