diff options
| author | nsfisis <nsfisis@gmail.com> | 2022-12-19 01:39:56 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2022-12-19 02:02:41 +0900 |
| commit | b67f8c76c20c8cb07b5f0aa52f53aaaf9f9f7576 (patch) | |
| tree | eb6e8f3786e791ffd71a33f4ee75079470dc9630 /.config/nvim/lua/init/01-options.lua | |
| parent | ae9846c9563f398b51927d499f0bfe45c9f53185 (diff) | |
| download | dotfiles-b67f8c76c20c8cb07b5f0aa52f53aaaf9f9f7576.tar.gz dotfiles-b67f8c76c20c8cb07b5f0aa52f53aaaf9f9f7576.tar.zst dotfiles-b67f8c76c20c8cb07b5f0aa52f53aaaf9f9f7576.zip | |
neovim: refactor: split init.lua
Diffstat (limited to '.config/nvim/lua/init/01-options.lua')
| -rw-r--r-- | .config/nvim/lua/init/01-options.lua | 153 |
1 files changed, 153 insertions, 0 deletions
diff --git a/.config/nvim/lua/init/01-options.lua b/.config/nvim/lua/init/01-options.lua new file mode 100644 index 0000000..c229251 --- /dev/null +++ b/.config/nvim/lua/init/01-options.lua @@ -0,0 +1,153 @@ +local O = vim.o +local OPT = vim.opt +local my_env = require('vimrc.my_env') + + +-- Moving around, searching and patterns {{{1 + +O.wrapscan = false +O.ignorecase = true +O.smartcase = true + + +-- Displaying text {{{1 + +O.scrolloff = 7 +O.linebreak = true +O.breakindent = true +OPT.breakindentopt:append('sbr') +O.showbreak = '> ' +O.sidescrolloff = 20 +OPT.fillchars = { + vert = ' ', + fold = ' ', + diff = ' ', +} +O.cmdheight = 1 +O.list = true +OPT.listchars = { + eol = '\xc2\xac', -- u00ac + tab = '\xe2\x96\xb8 ', -- u25b8 + trail = '\xc2\xb7', -- u00b7 + extends = '\xc2\xbb', -- u00bb + precedes = '\xc2\xab', -- u00ab +} +O.concealcursor = 'cnv' + + +-- Syntax, highlighting and spelling {{{1 + +O.background = 'dark' +O.synmaxcol = 500 +O.hlsearch = true +O.termguicolors = true +O.colorcolumn = '+1' + + +-- Multiple windows {{{1 + +O.winminheight = 0 +O.hidden = true +O.switchbuf = 'usetab' + + +-- Multiple tabpages {{{1 + +O.showtabline = 2 + + +-- Terminal {{{1 + +O.title = false + + +-- Using the mouse {{{1 + +O.mouse = '' + + +-- Messages and info {{{1 + +OPT.shortmess:append('asIc') +O.showmode = false +O.report = 999 +O.confirm = true + + +-- Selecting text {{{1 + +O.clipboard = 'unnamed' + + +-- Editing text {{{1 + +O.undofile = true +O.textwidth = 0 +OPT.completeopt:remove('preview') +O.pumheight = 10 +OPT.matchpairs:append('<:>') +O.joinspaces = false +OPT.nrformats:append('unsigned') + + +-- Tabs and indenting {{{1 +-- Note: you should also set them for each file types. +-- These following settings are used for unknown file types. + +O.tabstop = 4 +O.shiftwidth = 4 +O.softtabstop = 4 +O.expandtab = true +O.smartindent = true +O.copyindent = true +O.preserveindent = true + + +-- Folding {{{1 + +O.foldlevelstart = 0 +OPT.foldopen:append('insert') +O.foldmethod = 'marker' + + +-- Diff mode {{{1 + +OPT.diffopt:append('vertical') +OPT.diffopt:append('foldcolumn:3') + + +-- Mapping {{{1 + +O.maxmapdepth = 10 +O.timeout = false + + +-- Reading and writing files {{{1 + +O.fixendofline = false +O.fileformats = 'unix,dos' +O.backup = true +O.backupdir = my_env.backup_dir +O.autowrite = true + + +-- Command line editing {{{1 + +OPT.wildignore:append('*.o') +OPT.wildignore:append('*.obj') +OPT.wildignore:append('*.lib') +O.wildignorecase = true + + +-- Executing external commands {{{1 + +O.shell = 'zsh' +O.keywordprg = '' + + +-- Encoding {{{1 + +O.fileencodings = 'utf-8,cp932,euc-jp' + + +-- Misc. {{{1 |
