diff options
author | Tim Keller <tjk@tjkeller.xyz> | 2024-10-18 21:50:58 -0500 |
---|---|---|
committer | Tim Keller <tjk@tjkeller.xyz> | 2024-10-18 21:50:58 -0500 |
commit | 43558b3a614de4a9174824b1cb4de8bc1ad147a9 (patch) | |
tree | b00315d7783f457d675410e36c2a0cf68b022bcc /lua/tjk/options.lua | |
download | nvim-43558b3a614de4a9174824b1cb4de8bc1ad147a9.tar.xz nvim-43558b3a614de4a9174824b1cb4de8bc1ad147a9.zip |
initial commit
Diffstat (limited to 'lua/tjk/options.lua')
-rw-r--r-- | lua/tjk/options.lua | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/lua/tjk/options.lua b/lua/tjk/options.lua new file mode 100644 index 0000000..989c6c7 --- /dev/null +++ b/lua/tjk/options.lua @@ -0,0 +1,38 @@ +local opt = vim.opt +local api = vim.api + +-- misc +opt.autochdir = true -- stay in current directory when opening a file +opt.splitright = true -- open splits on right instead of left +opt.splitbelow = true -- open splits on bottom instead of top +opt.termguicolors = true -- truecolor in terminal, will be disabled in tty +opt.wrap = false -- disable word wrapping +opt.cursorline = true -- highlight current line + +-- line numbers +opt.number = true -- enable line numbers +opt.relativenumber = true -- enable relative line numbers + +-- show whitespace characters +opt.list = true -- show whitespace characters defined in listchars +opt.listchars = "tab:▏ ,space:·" -- highlight tabs and spaces + +-- tabbing +opt.tabstop = 4 -- set tabwidth to 4 instead of 8 +opt.shiftwidth = 4 -- tab key will only insert one tab + +-- search +opt.ignorecase = true -- case-insensitive search... +opt.smartcase = true -- ...unless the search term is capital + +-- experimental +opt.smartindent = true +opt.wildmode = "longest:list:full" -- Better auto-complete + +-- dont continue comments on to new lines (:help fo-table) +api.nvim_create_autocmd("FileType", { pattern = "*", callback = function() + opt.formatoptions:remove { "c", "r", "o" } +end}) + +-- ignore __pycache__ directories in file listings +opt.wildignore = "__pycache__/,*/__pycache__/" |