summaryrefslogtreecommitdiff
path: root/.config/nvim/lua
diff options
context:
space:
mode:
authorSaumit Dinesan <justsaumit@protonmail.com>2022-09-03 17:17:36 +0530
committerSaumit Dinesan <justsaumit@protonmail.com>2022-09-03 17:17:36 +0530
commit1574754b4e1a246becdba050412647a056889cc8 (patch)
treed6f8171a555aa3e9e287702f43904fe8f7bfd9f3 /.config/nvim/lua
parent887a9702febf9a5410d04a59cbd0c191835b711d (diff)
nvim=options.lua
Diffstat (limited to '.config/nvim/lua')
-rw-r--r--.config/nvim/lua/saumit/options.lua39
1 files changed, 39 insertions, 0 deletions
diff --git a/.config/nvim/lua/saumit/options.lua b/.config/nvim/lua/saumit/options.lua
new file mode 100644
index 0000000..b140c7c
--- /dev/null
+++ b/.config/nvim/lua/saumit/options.lua
@@ -0,0 +1,39 @@
+local options = {
+ number=true, -- Shows absolute linenumber
+ relativenumber=true, -- Shows linenumber relative to cursor
+ --combination of both^ for hybrid linenumber
+ showbreak="+++", -- wrap broken line prefix
+ textwidth=100,
+ numberwidth=4,
+ scrolloff=8, -- keeps cursor in middle of screen/scrolls 8lines in advance
+ mouse="a", -- enable mouse support
+ splitbelow=true,
+ splitright=true,
+ clipboard="unnamedplus", -- allows neovim to access system clipboard
+ --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
+ --signcolumn=true,
+ --undo/backup
+ backup=false,
+ swapfile=false,
+ undodir=os.getenv("HOME") .. "/.config/nvim/undodir",
+ undofile=true
+}
+--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+=-]]