1
0
mirror of https://codeberg.org/diginaut/dotfiles.git synced 2026-02-04 11:10:26 +01:00

25 Commits

Author SHA1 Message Date
c656dbbeb3 Support regular tmux 256 colour option 2026-01-27 14:31:32 +01:00
6c496fd2c0 stylua config for neovim config files 2026-01-26 17:07:07 +01:00
23c8c64f48 Lua file config 2026-01-26 17:02:08 +01:00
ec8317ddcd Explicit formatters; cleanup 2026-01-26 16:56:24 +01:00
ce732c7e75 Don't set options, those break layzvim apparently 2026-01-26 16:22:00 +01:00
8dd78f67ee Only open planning doc, and the new markdown version at that 2026-01-26 16:15:21 +01:00
fc926d42cb Cycle through useful checkbox states 2026-01-26 16:15:07 +01:00
19b4fcbc5f I'll use the cycle more anyway 2026-01-26 14:06:11 +01:00
cb0a57be0b Toggle markdown checkboxes, headings etc 2026-01-26 12:01:46 +01:00
75ab018b30 Automatic abbreviation expansion for some headings 2026-01-24 21:57:21 +01:00
6ff9e356c3 Detect when file was updated outside of neovim 2026-01-24 20:14:27 +01:00
443e7c3652 Abbreviation shortcuts for date, time, uuid 2026-01-24 20:14:12 +01:00
cf93d46371 Other bash/shell linter 2026-01-23 18:52:34 +01:00
d8740ddd85 Can I be more clear? 2026-01-22 13:51:58 +01:00
0ed9b0d077 More languages 2026-01-22 13:02:28 +01:00
57c4983148 Changed terminfo so italics etc work in nvim 2026-01-21 17:51:44 +01:00
da63f892c0 Removed 'todo' again, it's not handled by Treesitter 2026-01-21 17:44:04 +01:00
96d4cc6deb Use neovim if available 2026-01-21 14:40:13 +01:00
59f1dbec66 Ported todo file syntax highlighting from vim 2026-01-21 14:12:08 +01:00
e5b2f83f7b Better Markdown support 2026-01-21 12:15:28 +01:00
105d3273fb Treesitter has changed their API 2026-01-21 11:44:10 +01:00
292c44448f Fast finder, alternative for fzf/ripgrep 2026-01-21 11:12:06 +01:00
f9afaad121 Codeblock syntax highlighting 2026-01-21 11:11:34 +01:00
7c5962f7f3 bebop colorscheme with nice colours 2026-01-21 11:10:49 +01:00
99152ac85c Do not conceal quotes, code block openings etc 2026-01-21 11:10:31 +01:00
14 changed files with 168 additions and 17 deletions

View 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

View File

@@ -15,6 +15,8 @@ if not (vim.uv or vim.loop).fs_stat(lazypath) then
end end
vim.opt.rtp:prepend(lazypath) vim.opt.rtp:prepend(lazypath)
vim.filetype.add({ extension = { todo = "todo" } })
-- Make sure to setup `mapleader` and `maplocalleader` before -- Make sure to setup `mapleader` and `maplocalleader` before
-- loading lazy.nvim so that mappings are correct. -- loading lazy.nvim so that mappings are correct.
-- This is also a good place to setup other settings (vim.opt) -- This is also a good place to setup other settings (vim.opt)
@@ -29,7 +31,7 @@ require("lazy").setup({
}, },
-- Configure any other settings here. See the documentation for more details. -- Configure any other settings here. See the documentation for more details.
-- colorscheme that will be used when installing plugins. -- colorscheme that will be used when installing plugins.
install = { colorscheme = { "kanagawa-dragon" } }, install = { colorscheme = { "bebop" } },
-- automatically check for plugin updates -- automatically check for plugin updates
checker = { enabled = true }, checker = { enabled = true },
}) })

View File

@@ -5,12 +5,34 @@ vim.g.maplocalleader = ","
vim.opt.number = true vim.opt.number = true
vim.opt.relativenumber = false -- relative line numbers 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.opt.shiftwidth = 4 -- indent width
vim.bo.shiftwidth = 4 -- indent width
vim.opt.expandtab = true -- spaces instead of tabs vim.opt.expandtab = true -- spaces instead of tabs
vim.opt.smartindent = true -- smart indentation vim.opt.smartindent = true -- smart indentation
vim.opt.termguicolors = true -- true color support vim.opt.termguicolors = true -- true color support
vim.opt.clipboard = "unnamedplus" -- system clipboard vim.opt.clipboard = "unnamedplus" -- system clipboard
-- vim.opt.smoothscroll = true -- vim.opt.smoothscroll = true
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 -- Colorscheme is set in its plugin file

View File

@@ -1,13 +1,14 @@
return { return {
{ "folke/tokyonight.nvim" }, -- { "folke/tokyonight.nvim" },
{ "rebelot/kanagawa.nvim" }, -- { "rebelot/kanagawa.nvim" },
{ "Shatur/neovim-ayu" }, -- { "Shatur/neovim-ayu" },
{ "ATTron/bebop.nvim" },
-- Configure LazyVim to load our favourite colorscheme -- Configure LazyVim to load our favourite colorscheme
{ {
"LazyVim/LazyVim", "LazyVim/LazyVim",
opts = { opts = {
colorscheme = "kanagawa-dragon", colorscheme = "bebop",
},
}, },
} }
}

View File

@@ -0,0 +1,12 @@
return {
"stevearc/conform.nvim",
opts = {
formatters_by_ft = {
sh = { "shfmt" },
bash = { "shfmt" },
lua = { "stylua" },
fish = { "fish_indent" },
},
},
}

View File

@@ -0,0 +1,5 @@
return {
"yousefhadder/markdown-plus.nvim",
ft = "markdown",
opts = {},
}

View 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,
}

View File

@@ -0,0 +1,8 @@
return {
"nvim-telescope/telescope.nvim",
dependencies = { "nvim-lua/plenary.nvim" },
keys = {
{ "<leader>ff", "<cmd>Telescope find_files<cr>", desc = "Find Files" },
{ "<leader>fg", "<cmd>Telescope live_grep<cr>", desc = "Live Grep" },
},
}

View File

@@ -1,5 +1,57 @@
return { return {
"nvim-treesitter/nvim-treesitter", "nvim-treesitter/nvim-treesitter",
lazy = false, lazy = false, -- Keep false to ensure loading for Neo-tree
build = ":TSUpdate", build = ":TSUpdate",
config = function()
local treesitter = require("nvim-treesitter")
treesitter.setup()
treesitter.install({
"java",
"c",
"lua",
"vim",
"vimdoc",
"query",
-- "elixir",
-- "heex",
"markdown",
"markdown_inline",
"bash",
"javascript",
"typescript",
"html",
"toml",
"yaml",
})
vim.api.nvim_create_autocmd("FileType", {
pattern = {
"java",
"c",
"lua",
"vim",
"vimdoc",
"query",
-- "elixir",
-- "heex",
"markdown",
"markdown_inline",
"bash",
"javascript",
"typescript",
"html",
"toml",
"yaml",
},
callback = function()
-- syntax highlighting, provided by Neovim
vim.treesitter.start()
-- folds, provided by Neovim (I don't like folds)
-- vim.wo.foldexpr = 'v:lua.vim.treesitter.foldexpr()'
-- vim.wo.foldmethod = 'expr'
-- indentation, provided by nvim-treesitter
vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()"
end,
})
end,
} }

5
.config/nvim/stylua.toml Normal file
View File

@@ -0,0 +1,5 @@
indent_type = "Spaces"
indent_width = 2
column_width = 120
[sort_requires]
enabled = true

View File

@@ -0,0 +1 @@
../../../.vim/syntax/todo.vim

View File

@@ -2,9 +2,9 @@
set -g bell-action any set -g bell-action any
# Default termtype. If the rcfile sets $TERM, that overrides this value. # Default termtype. If the rcfile sets $TERM, that overrides this value.
set -g default-terminal tmux-256color-italic set -g default-terminal "tmux-256color"
#set -g terminal-overrides ',tmux-256color-italic:Tc' #set -g terminal-overrides ',tmux-256color-italic:Tc'
set -ga terminal-overrides ',*256col*:Tc' set -ga terminal-overrides ',*256col*:Tc:RGB'
# Keep your finger on ctrl, or don't # Keep your finger on ctrl, or don't
bind-key ^D detach-client bind-key ^D detach-client

9
.vimrc
View File

@@ -633,7 +633,7 @@ set hidden
set cryptmethod=blowfish2 set cryptmethod=blowfish2
" Ensure 256 colour support if the terminal supports it " 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 set background=dark
let g:enable_bold_font = 1 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 " Replace 'timeh' with a formatted date/time header
iab <expr> timeh strftime("## %Y%m%d %a %H:%M:%S") 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 " Fly through buffers instead of cycling
" nnoremap <leader>l :ls<cr>:b<space> " nnoremap <leader>l :ls<cr>:b<space>

View File

@@ -6,4 +6,8 @@ git pull
cd ~/divaultwiki cd ~/divaultwiki
git pull git pull
#vim -c ":vsp planning_2015.todo" notes_2015.md notes_2014.md #vim -c ":vsp planning_2015.todo" notes_2015.md notes_2014.md
vim -c "set nofoldenable" ~/divaultplan/planning_2026.todo ~/divaultphren/index.md ~/divaultwiki/home.md if ! command -v nvim >/dev/null 2>&1; then
vim -c "set nofoldenable" ~/divaultplan/planning_2026.md
else
nvim -c "set nofoldenable" ~/divaultplan/planning_2026.md
fi