summaryrefslogtreecommitdiff
path: root/.config/nvim/lua/justsaumit/options.lua
diff options
context:
space:
mode:
authorSaumit Dinesan <justsaumit@protonmail.com>2023-07-14 22:49:04 +0530
committerSaumit Dinesan <justsaumit@protonmail.com>2023-07-14 22:49:04 +0530
commit0cc4ed7dd6fc5b06de245246723138996d449571 (patch)
treeb8de0f83a99e0123bf740b9c8a278c9cbdc039e9 /.config/nvim/lua/justsaumit/options.lua
parent193034436557fb26adbc26f5fbd847016f6fe0be (diff)
nvim: Adding basic neovim config
Diffstat (limited to '.config/nvim/lua/justsaumit/options.lua')
-rw-r--r--.config/nvim/lua/justsaumit/options.lua46
1 files changed, 46 insertions, 0 deletions
diff --git a/.config/nvim/lua/justsaumit/options.lua b/.config/nvim/lua/justsaumit/options.lua
new file mode 100644
index 0000000..4eae867
--- /dev/null
+++ b/.config/nvim/lua/justsaumit/options.lua
@@ -0,0 +1,46 @@
+local options = {
+ number=true, -- Shows absolute linenumber
+ relativenumber=true, -- Shows linenumber relative to cursor
+ --combination of both^ for hybrid linenumber
+-- textwidth=100,
+ numberwidth=4,
+ scrolloff=8, -- keeps cursor in middle of screen/scrolls 8lines in advance
+ sidescroll=18,
+ mouse="a", -- enable mouse support
+ splitbelow=true, -- on horizontal split instead of opening window to left open it at right
+ splitright=true, -- on vertical split instead of opening window to left open it at right
+ termguicolors=true,
+ showmode=false, -- lualine does the job
+ cmdheight=1,
+ wrap=false,
+ whichwrap='b,s,<,>,[,],h,l',
+ clipboard="unnamedplus", -- allows neovim to access system clipboard using yank
+ fileencoding="UTF-8",
+ --spaces/tabs/indents
+ softtabstop=4, -- No. of spaces per tab
+ shiftwidth=4, -- No. of auto-indent space
+ expandtab=true, -- spaces inplace of tabs
+ autoindent=true, -- New line copies indentation from past line
+ smartindent=true, -- Indents in accordance to the syntax/style of the code extension
+ --searches
+ ignorecase=true, -- Ignore case-sensitivity during search
+ smartcase=true, -- If searching capital search only capital
+ hlsearch=false, -- no perma highlight post search
+ incsearch=true, -- searches for strings incrementally
+ showmatch=true, -- Highlight matching braces
+ --git integration/lsp/diagnostic
+ signcolumn="yes",
+ --undo/backup
+ backup=false,
+ swapfile=false,
+ undodir=os.getenv("HOME") .. "/.local/state/nvim/undodir",
+ undofile=true
+-- showbreak="+++", -- wrap broken line prefix
+}
+--forloop for table 'options'
+for key, value in pairs(options) do
+ vim.opt[key] = value
+end
+
+--to 'cw/'dw' a word containing '-' in between
+vim.cmd [[set iskeyword+=-]]