vim/zk: minor tweaks

This commit is contained in:
Jason Swank
2026-01-09 17:28:52 -05:00
parent cec2462d8b
commit c008ad9e3c
3 changed files with 126 additions and 3 deletions

117
nvim/.config/nvim/init.lua Normal file
View File

@@ -0,0 +1,117 @@
-- Basic settings
vim.cmd('syntax on')
vim.opt.smarttab = true
vim.opt.tabstop = 2
vim.opt.shiftwidth = 2
vim.opt.softtabstop = 2
vim.opt.expandtab = true
vim.opt.autoindent = true
vim.opt.backspace = 'indent,eol,start'
vim.opt.background = 'dark'
vim.cmd('colorscheme theunixzoo')
-- vim.cmd('colorscheme solarized8')
-- vim.opt.guifont = 'Droid Sans Mono 10'
vim.opt.guifont = 'Inconsolata 12'
vim.opt.guioptions:remove('T')
-- Use semicolon as colon for commands
vim.keymap.set('n', ';', ':')
-- Disable mouse support
vim.opt.mouse = ''
-- Filetype settings
vim.cmd('filetype plugin on')
vim.cmd('filetype indent on')
vim.opt.omnifunc = 'syntaxcomplete#Complete'
-- Python-specific settings
vim.api.nvim_create_autocmd('FileType', {
pattern = 'python',
callback = function()
vim.opt_local.tabstop = 4
vim.opt_local.expandtab = true
vim.opt_local.shiftwidth = 4
vim.opt_local.softtabstop = 4
end,
})
-- UltiSnips settings
vim.g.UltiSnipsExpandTrigger = '<tab>'
vim.g.UltiSnipsListSnippets = '<c-l>'
-- Insert current date with idate
vim.cmd([[iab idate <c-r>=strftime("%Y-%m-%d")<cr>]])
-- Leader key mappings
vim.keymap.set('n', '<leader>toc', "<cmd>.put =execute('.,$write !gh-md-toc --hide-header --hide-footer')<cr>")
vim.keymap.set('n', '<leader>tf', '<cmd>% !tofu fmt -no-color -<cr>')
vim.keymap.set('n', '<leader>jn', '<cmd>% !jsonnetfmt -<cr>')
vim.keymap.set('n', '<leader>js', '<cmd>% !jq . -<cr>')
-- Display settings
vim.opt.lazyredraw = true
vim.opt.wildmenu = true
vim.opt.showmatch = true
vim.opt.cursorline = true
-- Search down into subfolders
vim.opt.path:append('**')
-- netrw config
vim.g.netrw_banner = 0
vim.g.netrw_browse_split = 0
vim.g.netrw_altv = 1
vim.g.netrw_liststyle = 3
vim.g.netrw_list_hide = ',\\(^\\|\\s\\s\\)\\zs\\.\\S\\+'
-- fzf-lua keymaps
vim.keymap.set('n', '<c-p>', "<cmd>lua require('fzf-lua').files()<CR>")
vim.keymap.set('n', '<c-\\>', "<cmd>lua require('fzf-lua').buffers()<CR>")
vim.keymap.set('n', '<c-g>', "<cmd>lua require('fzf-lua').grep()<CR>")
-- Github Copilot
vim.g.copilot_enabled = 0
vim.keymap.set('n', '<leader>cp', ':let g:copilot_enabled = 1<CR>')
-- GO settings
vim.g.go_fmt_command = 'goimports'
vim.g.go_highlight_functions = 1
vim.g.go_highlight_methods = 1
vim.g.go_highlight_structs = 1
vim.g.go_highlight_interfaces = 1
vim.g.go_highlight_operators = 1
vim.g.go_highlight_build_constraints = 1
-- Markdown settings
vim.g.vim_markdown_folding_disabled = 1
-- vim.pack.add({
-- "https://github.com/ibhagwan/fzf-lua.git",
-- "https://github.com/fatih/vim-go.git",
-- "https://github.com/github/copilot.vim.git",
-- })
require("fzf-lua").setup {
-- winopts = { ... }, -- UI Options
-- keymap = { ... }, -- Neovim keymaps / fzf binds
-- actions = { ... }, -- Fzf "accept" binds
-- fzf_opts = { ... }, -- Fzf CLI flags
-- fzf_colors = { ... }, -- Fzf `--color` specification
-- hls = { ... }, -- Highlights
previewers = {
builtin = {
treesitter = false
}
}, -- Previewers options
-- SPECIFIC COMMAND/PICKER OPTIONS, SEE BELOW
-- files = { ... },
}
-- HCL/Terraform/Nomad settings
-- vim.g.hcl_fmt_autosave = 1
-- vim.g.tf_fmt_autosave = 1
-- vim.g.nomad_fmt_autosave = 1

View File

@@ -33,9 +33,14 @@ colorscheme theunixzoo
"colorscheme aomi-grayscale
"colorscheme solarized8
" disabled by default- enable this as needed to show hidden characters
" set list
" any trailing spaces are indicated by a ·
set list
set listchars=trail
" tabs are indicated by an arrow followed by a space
" arrows could be: → »
set listchars=tab:→\ ,trail
"source /home/jswank/.config/nvim/colors-now

View File

@@ -1,12 +1,13 @@
# {{format-date now '%Y-%m-%d'}}
[yesterday](daily/{{format-date (date "yesterday") '%Y-%m-%d'}}.md)
[yesterday](daily/{{format-date (date "yesterday") '%Y%m%d'}}.md)
## goals
- a bullet
- another bullet
## tracking
- [ ] harvest time sheet
- [ ] exercise
- [ ] dinner / logistics