diff options
author | Tim Keller <tjk@tjkeller.xyz> | 2025-10-04 15:00:02 -0500 |
---|---|---|
committer | Tim Keller <tjk@tjkeller.xyz> | 2025-10-04 15:00:02 -0500 |
commit | 6a0249fdd40ccd48df5c1055f4fb4a17f619820e (patch) | |
tree | bb7c9b52ef2f4c60c3c2aeee82ceba85a7bdc99e | |
parent | 0fb2d82c34a63c51b0e5fcc458382540603d482e (diff) | |
download | nvim-6a0249fdd40ccd48df5c1055f4fb4a17f619820e.tar.xz nvim-6a0249fdd40ccd48df5c1055f4fb4a17f619820e.zip |
cleanup options.lua and add some TODOs with plugins
-rw-r--r-- | lua/tjk/options.lua | 51 | ||||
-rw-r--r-- | lua/tjk/plugins/cmp.lua | 1 | ||||
-rw-r--r-- | lua/tjk/plugins/manageself.lua | 1 |
3 files changed, 27 insertions, 26 deletions
diff --git a/lua/tjk/options.lua b/lua/tjk/options.lua index 3b52283..782c2ea 100644 --- a/lua/tjk/options.lua +++ b/lua/tjk/options.lua @@ -1,50 +1,49 @@ -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 emulator, will be disabled in tty -opt.wrap = false -- disable word wrapping -opt.cursorline = true -- highlight current line -opt.title = true -- set window title of the terminal emulator to current nvim buffer -vim.cmd.aunmenu "PopUp" -- disable right click menu +vim.o.autochdir = true -- stay in current directory when opening a file +vim.o.splitright = true -- open splits on right instead of left +vim.o.splitbelow = true -- open splits on bottom instead of top +vim.o.termguicolors = true -- truecolor in terminal emulator, will be disabled in tty +vim.o.wrap = false -- disable word wrapping +vim.o.cursorline = true -- highlight current line +vim.o.title = true -- set window title of the terminal emulator to current nvim buffer +vim.o.signcolumn = "yes" -- keep left side column reserved for lsp +--vim.o.winborder = "single" -- border around floating windows +vim.cmd.aunmenu "PopUp" -- disable right click menu -- TODO remove this when issue #32660 is fixed by #33145 vim.g._ts_force_sync_parsing = true -- line numbers -opt.number = true -- enable line numbers -opt.relativenumber = true -- enable relative line numbers +vim.o.number = true -- enable line numbers +vim.o.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 +vim.o.list = true -- show whitespace characters defined in listchars +vim.o.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 +vim.o.tabstop = 4 -- set tabwidth to 4 instead of 8 +vim.o.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 +vim.o.ignorecase = true -- case-insensitive search... +vim.o.smartcase = true -- ...unless the search term is capital -- experimental -opt.smartindent = true -opt.wildmode = "list:longest,list:full" -- Better auto-complete +vim.o.smartindent = true +vim.opt.wildmode = { "list: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" } +vim.api.nvim_create_autocmd("FileType", { pattern = "*", callback = function() + vim.opt.formatoptions:remove { "c", "r", "o" } end}) -- ignore __pycache__ directories in file listings -opt.wildignore = "__pycache__/,*/__pycache__/" +vim.opt.wildignore = { "__pycache__/", "*/__pycache__/" } -- for running in tty if os.getenv "TERM" == "linux" then vim.cmd.colorscheme "vim" - opt.termguicolors = false - opt.list = false + vim.o.termguicolors = false + vim.o.list = false end diff --git a/lua/tjk/plugins/cmp.lua b/lua/tjk/plugins/cmp.lua index 3ea4026..9f16db2 100644 --- a/lua/tjk/plugins/cmp.lua +++ b/lua/tjk/plugins/cmp.lua @@ -1,4 +1,5 @@ return { + -- TODO look into native cmp "saghen/blink.cmp", opts = { keymap = { diff --git a/lua/tjk/plugins/manageself.lua b/lua/tjk/plugins/manageself.lua index 098c300..b2c989f 100644 --- a/lua/tjk/plugins/manageself.lua +++ b/lua/tjk/plugins/manageself.lua @@ -1,3 +1,4 @@ return { + -- TODO replace with vim.pack when moving to v0.12 "folke/lazy.nvim", -- so lazy can manage itself } |