aboutsummaryrefslogtreecommitdiff
path: root/.config/nvim/lua/settings.lua
diff options
context:
space:
mode:
authorAlec Goncharow <alec@goncharow.dev>2024-01-12 08:48:32 -0500
committerAlec Goncharow <alec@goncharow.dev>2024-01-12 08:48:32 -0500
commit803274ed25384b4ffb134f35c910347c022999fd (patch)
tree7ae72fc76bedac20c36e289afcbad0bb250369b7 /.config/nvim/lua/settings.lua
parent7ccc0f409ededaf3a19395f1bc1fb5e2686c37a0 (diff)
binding exploration
Diffstat (limited to '.config/nvim/lua/settings.lua')
-rw-r--r--.config/nvim/lua/settings.lua47
1 files changed, 28 insertions, 19 deletions
diff --git a/.config/nvim/lua/settings.lua b/.config/nvim/lua/settings.lua
index 837f22a..bfc771c 100644
--- a/.config/nvim/lua/settings.lua
+++ b/.config/nvim/lua/settings.lua
@@ -39,37 +39,46 @@ vim.o.showbreak = '↪' -- character to show when line is broken
vim.opt.clipboard = 'unnamedplus'
+-- title string
+vim.opt.title = true
+vim.opt.titlestring = 'neovim'
+
-- Sidebar
vim.o.number = true -- line number on the left
vim.o.numberwidth = 3 -- always reserve 3 spaces for line number
-vim.o.signcolumn = 'yes' -- keep 1 column for coc.vim check
+vim.o.signcolumn = 'yes' -- keep 1 column for check
vim.o.modelines = 0
vim.o.showcmd = true -- display command in bottom bar
+-- make term better
+vim.api.nvim_command('autocmd TermOpen * setlocal nonumber norelativenumber signcolumn=no')
+-- do insert on enter term
+-- vim.api.nvim_command('autocmd BufWinEnter,WinEnter term://* startinsert')
+
-- Search
-vim.o.incsearch = true -- starts searching as soon as typing, without enter needed
-vim.o.ignorecase = true -- ignore letter case when searching
-vim.o.smartcase = true -- case insentive unless capitals used in search
+vim.o.incsearch = true -- starts searching as soon as typing, without enter needed
+vim.o.ignorecase = true -- ignore letter case when searching
+vim.o.smartcase = true -- case insentive unless capitals used in search
-vim.o.matchtime = 2 -- delay before showing matching paren
-vim.o.mps = vim.o.mps .. ",<:>"
+vim.o.matchtime = 2 -- delay before showing matching paren
+vim.o.mps = vim.o.mps .. ",<:>"
-- White characters
-vim.o.autoindent = true
-vim.o.smartindent = true
-vim.o.tabstop = 2 -- 1 tab = 2 spaces
-vim.o.shiftwidth = 2 -- indentation rule
-vim.o.formatoptions =
-'qnj1' -- q - comment formatting; n - numbered lists; j - remove comment when joining lines; 1 - don't break after one-letter word
-vim.o.expandtab = true -- expand tab to spaces
+vim.o.autoindent = true
+vim.o.smartindent = true
+vim.o.tabstop = 2 -- 1 tab = 2 spaces
+vim.o.shiftwidth = 2 -- indentation rule
+vim.o.formatoptions =
+'qnj1' -- q - comment formatting; n - numbered lists; j - remove comment when joining lines; 1 - don't break after one-letter word
+vim.o.expandtab = true -- expand tab to spaces
-- Backup files
-vim.o.backup = true -- use backup files
-vim.o.writebackup = false
-vim.o.swapfile = false -- do not use swap file
-vim.o.undodir = HOME .. '/.vim/tmp/undo//' -- undo files
-vim.o.backupdir = HOME .. '/.vim/tmp/backup//' -- backups
-vim.o.directory = '/.vim/tmp/swap//' -- swap files
+vim.o.backup = true -- use backup files
+vim.o.writebackup = false
+vim.o.swapfile = false -- do not use swap file
+vim.o.undodir = HOME .. '/.vim/tmp/undo//' -- undo files
+vim.o.backupdir = HOME .. '/.vim/tmp/backup//' -- backups
+vim.o.directory = '/.vim/tmp/swap//' -- swap files
vim.cmd([[
au FileType python set ts=4 sw=4