mirror of
https://codeberg.org/diginaut/dotfiles.git
synced 2026-02-04 06:40:25 +01:00
Compare commits
15 Commits
57c4983148
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| c656dbbeb3 | |||
| 6c496fd2c0 | |||
| 23c8c64f48 | |||
| ec8317ddcd | |||
| ce732c7e75 | |||
| 8dd78f67ee | |||
| fc926d42cb | |||
| 19b4fcbc5f | |||
| cb0a57be0b | |||
| 75ab018b30 | |||
| 6ff9e356c3 | |||
| 443e7c3652 | |||
| cf93d46371 | |||
| d8740ddd85 | |||
| 0ed9b0d077 |
9
.config/nvim/after/ftplugin/lua.lua
Normal file
9
.config/nvim/after/ftplugin/lua.lua
Normal file
@@ -0,0 +1,9 @@
|
||||
-- indent_type = "Spaces"
|
||||
-- indent_width = 4
|
||||
-- call_parentheses = "Always"
|
||||
-- column_width = 120
|
||||
|
||||
vim.bo.tabstop = 4
|
||||
vim.bo.softtabstop = 4
|
||||
vim.bo.shiftwidth = 4
|
||||
vim.bo.expandtab = true
|
||||
@@ -5,13 +5,34 @@ vim.g.maplocalleader = ","
|
||||
|
||||
vim.opt.number = true
|
||||
vim.opt.relativenumber = false -- relative line numbers
|
||||
vim.opt.tabstop = 4 -- tab width
|
||||
vim.opt.tabstop = 4 -- tab width in spaces
|
||||
vim.bo.tabstop = 4 -- tab width in spaces
|
||||
vim.opt.shiftwidth = 4 -- indent width
|
||||
vim.bo.shiftwidth = 4 -- indent width
|
||||
vim.opt.expandtab = true -- spaces instead of tabs
|
||||
vim.opt.smartindent = true -- smart indentation
|
||||
vim.opt.termguicolors = true -- true color support
|
||||
vim.opt.clipboard = "unnamedplus" -- system clipboard
|
||||
-- vim.opt.smoothscroll = true
|
||||
vim.opt.conceallevel = 0
|
||||
vim.opt.conceallevel = 0 -- please don't hide stuff from me
|
||||
vim.opt.wrap = true -- Enable line wrap
|
||||
|
||||
vim.opt.spelllang = { "en", "nl" }
|
||||
|
||||
-- Replace 'dayh' with a formatted day header
|
||||
vim.cmd("iab <expr> dayh strftime('== %Y%m%d %A ======')")
|
||||
-- Replace 'timeh' with a formatted date/time header
|
||||
vim.cmd("iab <expr> timeh strftime('## %Y%m%d %a %H:%M:%S')")
|
||||
|
||||
-- vim.cmd("iabbrev <expr> ,d strftime('%Y-%m-%d')")
|
||||
-- vim.cmd("iabbrev <expr> ,t strftime('%Y-%m-%dT%TZ')")
|
||||
vim.cmd("inoreabbrev <expr> ,u system('uuidgen')->trim()->tolower()")
|
||||
|
||||
-- Enable autoread and set up checking triggers
|
||||
vim.o.autoread = true
|
||||
vim.api.nvim_create_autocmd({ "FocusGained", "BufEnter" }, {
|
||||
command = "if mode() != 'c' | checktime | endif",
|
||||
pattern = "*",
|
||||
})
|
||||
|
||||
-- Colorscheme is set in its plugin file
|
||||
|
||||
12
.config/nvim/lua/plugins/conform.lua
Normal file
12
.config/nvim/lua/plugins/conform.lua
Normal file
@@ -0,0 +1,12 @@
|
||||
return {
|
||||
"stevearc/conform.nvim",
|
||||
opts = {
|
||||
|
||||
formatters_by_ft = {
|
||||
sh = { "shfmt" },
|
||||
bash = { "shfmt" },
|
||||
lua = { "stylua" },
|
||||
fish = { "fish_indent" },
|
||||
},
|
||||
},
|
||||
}
|
||||
23
.config/nvim/lua/plugins/markdown-toggle.lua
Normal file
23
.config/nvim/lua/plugins/markdown-toggle.lua
Normal file
@@ -0,0 +1,23 @@
|
||||
return {
|
||||
"roodolv/markdown-toggle.nvim",
|
||||
config = function()
|
||||
require("markdown-toggle").setup({
|
||||
-- cycle through checkboxes
|
||||
cycle_box_table = true,
|
||||
-- doing, done, wut, important, forwarded
|
||||
box_table = { "/", "x", "?", "!", ">" },
|
||||
keymaps = {
|
||||
toggle = {
|
||||
["<C-q>"] = "quote",
|
||||
["<C-l>"] = "list",
|
||||
["<Leader><C-l>"] = "list_cycle",
|
||||
["<C-n>"] = "olist",
|
||||
["<M-x>"] = "checkbox_cycle",
|
||||
["<Leader><M-x>"] = "checkbox",
|
||||
["<C-h>"] = "heading",
|
||||
["<Leader><C-h>"] = "heading_toggle",
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
5
.config/nvim/stylua.toml
Normal file
5
.config/nvim/stylua.toml
Normal file
@@ -0,0 +1,5 @@
|
||||
indent_type = "Spaces"
|
||||
indent_width = 2
|
||||
column_width = 120
|
||||
[sort_requires]
|
||||
enabled = true
|
||||
9
.vimrc
9
.vimrc
@@ -633,7 +633,7 @@ set hidden
|
||||
set cryptmethod=blowfish2
|
||||
|
||||
" Ensure 256 colour support if the terminal supports it
|
||||
if has("gui_running") || &term == "xterm" || &term == "xterm-256color" || &term == "screen-bce" || &term == "screen-256color" || &term == "screen" || &term == "tmux-256color-italic"
|
||||
if has("gui_running") || &term == "xterm" || &term == "xterm-256color" || &term == "screen-bce" || &term == "screen-256color" || &term == "screen" || &term == "tmux-256color" || &term == "tmux-256color-italic"
|
||||
|
||||
set background=dark
|
||||
let g:enable_bold_font = 1
|
||||
@@ -674,6 +674,13 @@ iab <expr> dayh strftime("== %Y%m%d %A ======")
|
||||
" Replace 'timeh' with a formatted date/time header
|
||||
iab <expr> timeh strftime("## %Y%m%d %a %H:%M:%S")
|
||||
|
||||
iabbrev <expr> ,d strftime('%Y-%m-%d')
|
||||
iabbrev <expr> ,t strftime('%Y-%m-%dT%TZ')
|
||||
inoreabbrev <expr> ,u system('uuidgen')->trim()->tolower()
|
||||
" vim.cmd("iabbrev <expr> ,d strftime('%Y-%m-%d')")
|
||||
" vim.cmd("iabbrev <expr> ,t strftime('%Y-%m-%dT%TZ')")
|
||||
" vim.cmd("inoreabbrev <expr> ,u system('uuidgen')->trim()->tolower()")
|
||||
|
||||
" Fly through buffers instead of cycling
|
||||
" nnoremap <leader>l :ls<cr>:b<space>
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ cd ~/divaultwiki
|
||||
git pull
|
||||
#vim -c ":vsp planning_2015.todo" notes_2015.md notes_2014.md
|
||||
if ! command -v nvim >/dev/null 2>&1; then
|
||||
vim -c "set nofoldenable" ~/divaultplan/planning_2026.todo ~/divaultphren/index.md ~/divaultwiki/home.md
|
||||
vim -c "set nofoldenable" ~/divaultplan/planning_2026.md
|
||||
else
|
||||
nvim -c "set nofoldenable" ~/divaultplan/planning_2026.todo ~/divaultphren/index.md ~/divaultwiki/home.md
|
||||
nvim -c "set nofoldenable" ~/divaultplan/planning_2026.md
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user