Super long list of changes

- ansible:
  - use "true, false" instead of "yes, no" (yamllint is annoying)
  - use community.general.packaging.? module paths instead of plain
    community.general.?
- nvim:
  - lazy-load which-key.nvim
  - add experimental winbar inside feline.nvim
  - replace nvim-colorizer.lua with ccc.nvim
  - load bufferline.nvim stuff conditionally (plugins, keymaps)
  - clean up telescope keymap I rarely use
  - improve path completion for nvim-cmp with nvim-web-devicons
  - refactor plugins.lua files to look cleaner
  - replace close-buffers.nvim with bufdelete.nvim
- alacritty: upgrade config to 0.11.0
- pyradio: use Jinja2 template for theme file
- fish:
  - add environment variables for helmfile, gopass, pulumi, vivid
  - rollback $NPM_CONFIG_PREFIX (it is used to set $PATH)
- git:
  - add git-privacy
  - tweak aliases a bit to look nicer
- dotfiles:
  - rename `terminal` variable to `terminal_emulators`
- extend:
  - merge `flatpak` role into `packages`
  - merge `wallpapers` and `soundtheme` roles into `theme`
This commit is contained in:
Hoang Nguyen 2022-10-16 11:00:00 +07:00
parent 7085637ccd
commit badeebcde1
No known key found for this signature in database
GPG key ID: 813CF484F4993419
138 changed files with 846 additions and 562 deletions

View file

@ -20,6 +20,7 @@ Plans for the future of this dotfiles.
- [ ] Wayland compositors: [japokwm](https://github.com/werererer/japokwm), [dwl](https://github.com/djpohly/dwl), [labwc](https://github.com/labwc/labwc), [vivarium](https://github.com/inclement/vivarium), [qtile](https://github.com/qtile/qtile) (also revaluate [hikari](https://hub.darcs.net/raichoo/hikari) and [wayfire](https://wayfire.org))
- [ ] [tremc](https://github.com/tremc/tremc) / [rtorrent](https://github.com/rakshasa/rtorrent/)
- [ ] Other terminals (contour, wezterm)
- [ ] superd
## Cosmetic
@ -43,18 +44,20 @@ Plans for the future of this dotfiles.
- [ ] OneDark theme
- [ ] Catppuccin theme
- [ ] Put theme color variables inside a variable (using `include_vars`)
### Configuration
- [ ] winbar (using feline.nvim and nvim-gps)
- [ ] vim.g, vim.o -> nvim_set_var, nvim_set_option
- [ ] feline.nvim, orgmode, sniprun theme refactor
- [ ] Different background for active/inactive winbar (also notice nvim-navic)
### Interesting plugins
My Neovim config is already a mess, so it's fine making it even messier.
- [ ] Revaluate [lspsaga.nvim](https://github.com/glepnir/lspsaga.nvim)
- [ ] [lspsaga.nvim](https://github.com/glepnir/lspsaga.nvim)
- [ ] noice.nvim
- [ ] HighStr.nvim
- [ ] NeoZoom.lua
- [ ] abbreinder.nvim
@ -111,7 +114,6 @@ My Neovim config is already a mess, so it's fine making it even messier.
- [ ] nvim-lastplace
- [ ] nvim-magic
- [ ] nvim-mapper
- [ ] nvim-navic
- [ ] nvim-regexplainer
- [ ] nvim-remote-containers
- [ ] nvim-revJ.lua

View file

@ -15,7 +15,7 @@ wallpaper_engine: swww
default_browser: chromium-browser
clipboard: clipman
clipboard: cliphist
notification: dunst
@ -30,7 +30,7 @@ music_daemon: mpd
ssh_client: openssh
# List of terminal emulators, in precedence order
terminal:
terminal_emulators:
- foot
- alacritty

View file

@ -2,17 +2,13 @@
# This playbook should be run in trunks with tags
- name: Tasks unrelated to dotfiles management
hosts: all
gather_facts: yes
gather_facts: true
roles:
- role: chroot
tags: chroot
- role: podman
tags: podman
- role: flatpak
tags: flatpak
- role: packages
tags: packages
- role: soundtheme
tags: [sound, theme]
- role: wallpapers
tags: [wallpaper, theme]
- role: theme
tags: theme

View file

@ -18,7 +18,7 @@
owner: root
group: root
mode: 0644
become: yes
become: true
- name: chroot | Install a stupid script for chrooting
template:

View file

@ -0,0 +1,2 @@
#!/bin/sh
git-privacy redate --only-head

View file

@ -0,0 +1,3 @@
#!/bin/sh
# pass stdin rewrite info to git-privacy
git-privacy log-rewrites --type "$1"

View file

@ -0,0 +1,2 @@
#!/bin/sh
git-privacy check

View file

@ -0,0 +1,2 @@
#!/bin/sh
git-privacy pre-push "$@"

View file

@ -45,6 +45,7 @@ https://www.reddit.com/r/badcode/new.rss "~r/badcode" reddit p
https://nvd.nist.gov/feeds/xml/cve/misc/nvd-rss.xml "~8-day vulnerabilities" security
https://nvd.nist.gov/feeds/xml/cve/misc/nvd-rss-analyzed.xml "~8-day vulnerabilities (info)" security
=========News==========
https://lwn.net/headlines/rss "~LWN.net" news
https://distrowatch.com/news/dw.xml "~DistroWatch" news
https://this-week-in-neovim.org/rss "~This week in Neovim" news
https://news.ycombinator.com/rss "~Hacker News" news

View file

@ -1,3 +1,2 @@
prefix=${XDG_DATA_HOME}/npm
cache=${XDG_CACHE_HOME}/npm
init-module=${XDG_CONFIG_HOME}/npm/config/npm-init.js

View file

@ -5,7 +5,6 @@ end
require('user.options')
require('user.autocmd')
require('user.keymap')
-- packer_compiled.lua is loaded, so this is not needed early
vim.defer_fn(function()

View file

@ -1,14 +1,7 @@
local map = require('user.keymap.mappings')
local augroups = {
bufs = {
-- {
-- event = { 'BufWritePost', 'FileWritePost' },
-- opts = {
-- pattern = '*.vim',
-- nested = true,
-- command = 'if &l:autoread > 0 | source <afile> | echo "source " . bufname("%") | endif',
-- desc = 'Reload Vim script automatically if setlocal autoread',
-- },
-- },
{
event = 'BufWritePre',
opts = {
@ -152,6 +145,51 @@ local augroups = {
}
},
},
keymaps = {
{
event = 'BufReadPre',
opts = {
pattern = '*',
callback = function(args)
require('which-key').register(map.local_map,
{ buffer = vim.api.nvim_get_current_buf(), prefix = '<localleader>' })
end,
desc = 'Setup key bindings for localleader',
},
},
{
event = 'FileType',
opts = {
pattern = 'org',
callback = function(args)
require('which-key').register(map.org_map, { buffer = vim.api.nvim_get_current_buf() })
end,
desc = 'Setup key bindings for Org files',
},
},
{
event = 'FileType',
opts = {
pattern = 'tex',
callback = function(args)
require('which-key').register(map.tex_map,
{ buffer = vim.api.nvim_get_current_buf(), prefix = '<localleader>' })
end,
desc = 'Setup key bindings for LaTEX files',
},
},
{
event = 'FileType',
opts = {
pattern = 'markdown',
callback = function(args)
require('which-key').register(map.markdown_map,
{ buffer = vim.api.nvim_get_current_buf(), prefix = '<localleader>' })
end,
desc = 'Setup key bindings for Markdown files',
},
},
},
}
require('user.utils.functions').load_autocmd(augroups)

View file

@ -12,50 +12,3 @@ wk.register(map.normal_map)
wk.register(map.visual_map, { mode = 'x' })
wk.register(map.normal_with_leader_map, { prefix = '<leader>' })
wk.register(map.visual_with_leader_map, { mode = 'x', prefix = '<leader>' })
-- Key mappings loaded conditionally
local augroup = {
keymaps = {
{
event = 'BufReadPre',
opts = {
pattern = '*',
callback = function(args)
wk.register(map.local_map, { buffer = vim.api.nvim_get_current_buf(), prefix = '<localleader>' })
end,
desc = 'Setup key bindings for localleader',
},
},
{
event = 'FileType',
opts = {
pattern = 'org',
callback = function(args)
wk.register(map.org_map, { buffer = vim.api.nvim_get_current_buf() })
end,
desc = 'Setup key bindings for Org files',
},
},
{
event = 'FileType',
opts = {
pattern = 'tex',
callback = function(args)
wk.register(map.tex_map, { buffer = vim.api.nvim_get_current_buf(), prefix = '<localleader>' })
end,
desc = 'Setup key bindings for LaTEX files',
},
},
{
event = 'FileType',
opts = {
pattern = 'markdown',
callback = function(args)
wk.register(map.markdown_map, { buffer = vim.api.nvim_get_current_buf(), prefix = '<localleader>' })
end,
desc = 'Setup key bindings for Markdown files',
},
},
},
}
require('user.utils.functions').load_autocmd(augroup)

View file

@ -101,9 +101,6 @@ M.normal_map = {
},
},
z = { name = 'Misc utils' },
-- Move between tabs
['<TAB>'] = { '<cmd>BufferLineCycleNext<CR>', 'Next buffer' },
['<S-TAB>'] = { '<cmd>BufferLineCyclePrev<CR>', 'Previous buffer' },
-- ToggleTerm
['<C-\\>'] = { '<cmd>ToggleTerm<CR>', 'Toggle terminal' },
['<A-\\>'] = { '<cmd>ToggleTerm direction=float<CR>', 'Toggle float terminal' },
@ -129,6 +126,12 @@ M.visual_map = {
}
M.normal_with_leader_map = {
c = {
name = 'Colorizer',
c = { '<cmd>CccConvert<CR>', 'Convert color under cursor' },
t = { '<cmd>CccHighlighterToggle<CR>', 'Highlight colors' },
p = { '<cmd>CccPick<CR>', 'Pick colors' },
},
d = {
name = 'DAP',
b = 'Toggle breakpoint',
@ -159,15 +162,11 @@ M.normal_with_leader_map = {
},
f = {
name = 'Telescope',
a = { '<cmd>Telescope autocommands<CR>', 'Autocommands' },
b = { '<cmd>Telescope buffers<CR>', 'Buffers' },
c = { '<cmd>Telescope commands<CR>', 'Commands' },
d = { '<cmd>Telescope projects<CR>', 'Recent directories' },
e = { '<cmd>Telescope file_browser<CR>', 'File browser' },
f = { '<cmd>Telescope find_files<CR>', 'Find files' },
g = { '<cmd>Telescope live_grep<CR>', 'Live grep' },
h = { '<cmd>Telescope help_tags<CR>', 'Help tags' },
i = { '<cmd>Telescope highlights<CR>', 'Highlight groups' },
j = {
name = 'Symbols',
g = 'Gitmoji',
@ -179,20 +178,12 @@ M.normal_with_leader_map = {
n = 'Nerd-fonts symbols',
t = 'Latex symbols',
},
k = { '<cmd>Telescope keymaps<CR>', 'Normal keymaps' },
l = { '<cmd>Telescope notify<CR>', 'Notification history' },
m = { '<cmd>Telescope marks<CR>', 'Bookmarks' },
n = { '<cmd>Telescope man_pages<CR>', 'Man pages' },
o = { '<cmd>Telescope oldfiles<CR>', 'Recent files' },
p = { '<cmd>Telescope project display_type=full<CR>', 'Projects' },
q = { '<cmd>Telescope env<CR>', 'Environment variables' },
r = { '<cmd>Telescope reloader<CR>', 'Reload lua modules' },
s = { '<cmd>Telescope treesitter<CR>', 'Treesitter' },
t = { '<cmd>TodoTelescope<CR>', 'Todo list' },
t = { '<cmd>TodoTelescope<CR>', 'TODO list' },
u = { '<cmd>Telescope current_buffer_fuzzy_find<CR>', 'Search current buffer' },
v = { '<cmd>Telescope vim_options<CR>', 'Vim options' },
y = { '<cmd>Telescope filetypes<CR>', 'Filetypes' },
z = { '<cmd>Telescope registers<CR>', 'Vim registers' },
},
g = {
name = 'Git',
@ -259,20 +250,7 @@ M.visual_with_leader_map = {
}
M.local_map = {
b = { '<cmd>BufferLinePick<CR>', 'Pick buffer' },
c = { '<cmd>ColorizerToggle<CR>', 'Colorizer' },
d = {
name = 'Delete',
a = { '<cmd>BDelete all<CR>', 'All buffers' },
d = { '<cmd>BDelete this<CR>', 'Current buffer' },
h = { '<cmd>BDelete hidden<CR>', 'Hidden buffers' },
n = { '<cmd>BDelete nameless<CR>', 'Buffers without name' },
o = { '<cmd>BDelete other<CR>', 'Other buffers' },
},
j = { '<cmd>BufferLineCyclePrev<CR>', 'Previous buffer' },
k = { '<cmd>BufferLineCycleNext<CR>', 'Next buffer' },
n = { '<cmd>enew<CR>', 'New buffer' },
q = { '<cmd>BufferLinePickClose<CR>', 'Close buffer' },
t = { '<cmd>tabnew<CR>', 'New tab' },
u = { '<cmd>UndotreeToggle<CR>', 'Undotree' },
}
@ -425,4 +403,16 @@ M.undefined_map = {
},
}
-- I disable tabline sometimes
if vim.opt.showtabline:get() ~= 0 then
-- Move between tabs
M.normal_map['<TAB>'] = { '<cmd>BufferLineCycleNext<CR>', 'Next buffer' }
M.normal_map['<S-TAB>'] = { '<cmd>BufferLineCyclePrev<CR>', 'Previous buffer' }
-- Pick, close and cycle buffers
M.local_map.b = { '<cmd>BufferLinePick<CR>', 'Pick buffer' }
M.local_map.j = { '<cmd>BufferLineCyclePrev<CR>', 'Previous buffer' }
M.local_map.k = { '<cmd>BufferLineCycleNext<CR>', 'Next buffer' }
M.local_map.q = { '<cmd>BufferLinePickClose<CR>', 'Close buffer' }
end
return M

View file

@ -8,4 +8,3 @@ return {
opts = { noremap = true, silent = true },
},
}

View file

@ -57,6 +57,15 @@ cmp.setup {
formatting = {
fields = { 'kind', 'abbr', 'menu' },
format = function(entry, vim_item)
if vim.tbl_contains({ 'path' }, entry.source.name) then
local icon, hl_group = require('nvim-web-devicons').get_icon(entry:get_completion_item().label)
if icon then
vim_item.kind = icon
vim_item.kind_hl_group = hl_group
return vim_item
end
end
vim_item.kind = cmpkind_icons[vim_item.kind] .. ' '
vim_item.menu = source_items[entry.source.name]
return vim_item

View file

@ -1,19 +1,16 @@
local M = {}
M['rafamadriz/friendly-snippets'] = { opt = true }
M['L3MON4D3/LuaSnip'] = {
wants = 'friendly-snippets',
config = function()
require('user.modules.completion.config.luasnip')
end,
opt = true,
}
M['hrsh7th/nvim-cmp'] = {
event = 'InsertEnter',
wants = { 'LuaSnip', 'neogen' },
requires = {
{
'L3MON4D3/LuaSnip',
wants = 'friendly-snippets',
requires = { { 'rafamadriz/friendly-snippets', opt = true } },
config = function()
require('user.modules.completion.config.luasnip')
end,
opt = true,
},
},
config = function()
require('user.modules.completion.config.cmp')
end,

View file

@ -2,6 +2,7 @@ local M = {
-- Plugins needed by others
['wbthomason/packer.nvim'] = { opt = true },
['kyazdani42/nvim-web-devicons'] = { opt = true },
['MunifTanjim/nui.nvim'] = { opt = true },
['nvim-lua/plenary.nvim'] = { opt = true },
['nvim-lua/popup.nvim'] = { opt = true },
['tpope/vim-repeat'] = { opt = true },
@ -9,11 +10,6 @@ local M = {
-- Plugins loaded on startup
['lewis6991/impatient.nvim'] = { opt = false },
['folke/which-key.nvim'] = {
config = function()
require('user.modules.core.config.which-key')
end,
},
}
return M

View file

@ -0,0 +1,44 @@
local ccc = require('ccc')
ccc.setup {
default_color = '#000000',
bar_char = '',
point_char = '',
bar_len = 30,
win_opts = {
relative = 'cursor',
row = 1,
col = 1,
style = 'minimal',
border = vim.g.border_style,
},
inputs = {
ccc.input.rgb,
ccc.input.hsl,
ccc.input.cmyk,
},
outputs = {
ccc.output.hex,
ccc.output.hex_short,
ccc.output.css_rgb,
ccc.output.css_hsl,
},
pickers = {
ccc.picker.hex,
ccc.picker.css_rgb,
ccc.picker.css_hsl,
},
convert = {
{ ccc.picker.hex, ccc.output.css_rgb },
{ ccc.picker.css_rgb, ccc.output.css_hsl },
{ ccc.picker.css_hsl, ccc.output.hex },
},
auto_close = true,
preserve = false,
save_on_quit = false,
highlight_mode = 'bg',
highlighter = {
auto_enable = false,
lsp = true,
},
}

View file

@ -1,22 +0,0 @@
require('colorizer').setup {
filetypes = { '*' },
user_default_options = {
RGB = true, -- #RGB hex codes
RRGGBB = true, -- #RRGGBB hex codes
names = false, -- 'Name' codes like Blue or blue
RRGGBBAA = true, -- #RRGGBBAA hex codes
AARRGGBB = true, -- 0xAARRGGBB hex codes
rgb_fn = true, -- CSS rgb() and rgba() functions
hsl_fn = true, -- CSS hsl() and hsla() functions
css = false, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB
css_fn = false, -- Enable all CSS *functions*: rgb_fn, hsl_fn
-- Available modes for `mode`: foreground, background, virtualtext
mode = 'background', -- Set the display mode.
-- Available methods are false / true / 'normal' / 'lsp' / 'both'
-- True is same as normal
tailwind = 'both', -- Enable tailwind colors
-- parsers can contain values used in |user_default_options|
sass = { enable = true, parsers = { 'css' }, }, -- Enable sass colors
virtualtext = '',
},
}

View file

@ -5,7 +5,7 @@ require('indent_blankline').setup {
char = '',
-- space_char_blankline = '·',
show_first_indent_level = true,
filetype_exclude = vim.fn.extend(ft_exclude, {
filetype_exclude = vim.tbl_extend('force', ft_exclude, {
'log',
'gitcommit',
'markdown',

View file

@ -0,0 +1,9 @@
require('neoscroll').setup {
mappings = { '<C-u>', '<C-d>', '<C-b>', '<C-f>',
'<C-y>', '<C-e>', 'zt', 'zz', 'zb' },
hide_cursor = false,
stop_eof = true,
respect_scrolloff = false,
cursor_scrolls_alone = true,
performance_mode = false,
}

View file

@ -1,3 +1,9 @@
require('org-bullets').setup {
symbols = { '', '', '', '' }
indent = true,
concealcursor = false,
show_current_line = true,
symbols = {
headlines = { '', '', '', '' },
checkboxes = {},
}
}

View file

@ -1,6 +1,7 @@
require('nvim-treesitter.configs').setup {
ensure_installed = 'all',
sync_install = false,
auto_install = false,
highlight = {
enable = true,
additional_vim_regex_highlighting = { 'org' },

View file

@ -8,10 +8,10 @@ M['mracos/mermaid.vim'] = { ft = 'mermaid' }
M['tsandall/vim-rego'] = { ft = 'rego' }
M['vmchale/dhall-vim'] = { ft = 'dhall' }
M['NvChad/nvim-colorizer.lua'] = {
cmd = 'ColorizerToggle',
M['uga-rosa/ccc.nvim'] = {
cmd = { 'CccPick', 'CccConvert', 'CccHighlighterToggle' },
config = function()
require('user.modules.editor.config.colorizer')
require('user.modules.editor.config.ccc')
end,
}
M['Olical/conjure'] = { -- TODO: config, check out fennel-repl.nvim
@ -19,19 +19,16 @@ M['Olical/conjure'] = { -- TODO: config, check out fennel-repl.nvim
}
M['nvim-orgmode/orgmode'] = {
ft = 'org',
-- requires = {
-- {
-- 'akinsho/org-bullets.nvim',
-- after = 'orgmode.nvim',
-- config = function()
-- require('user.modules.editor.config.org-bullets')
-- end,
-- },
-- },
config = function()
require('user.modules.editor.config.orgmode')
end,
}
-- M['akinsho/org-bullets.nvim'] = {
-- after = 'orgmode',
-- config = function()
-- require('user.modules.editor.config.org-bullets')
-- end,
-- }
M['folke/todo-comments.nvim'] = {
wants = 'plenary.nvim',
event = 'BufRead',
@ -91,19 +88,15 @@ M['kylechui/nvim-surround'] = {
require('user.modules.editor.config.surround')
end,
}
M['folke/twilight.nvim'] = {
cmd = { 'Twilight', 'TwilightEnable' },
config = function()
require('user.modules.editor.config.twilight')
end,
}
M['folke/zen-mode.nvim'] = { -- TODO: check out true-zen.nvim
cmd = 'ZenMode',
wants = 'twilight.nvim',
requires = {
{
'folke/twilight.nvim',
cmd = { 'Twilight', 'TwilightEnable' },
config = function()
require('user.modules.editor.config.twilight')
end,
opt = true,
},
},
config = function()
require('user.modules.editor.config.zenmode')
end,
@ -223,5 +216,11 @@ M['ggandor/flit.nvim'] = {
require('user.modules.editor.config.flit')
end,
}
M['karb94/neoscroll.nvim'] = {
event = 'WinScrolled',
config = function()
require('user.modules.editor.config.neoscroll')
end,
}
return M

View file

@ -4,7 +4,29 @@ local funcs = require('user.modules.lsp.utils.functions')
local common_config = {
on_attach = utils.common_on_attach,
capabilities = utils.common_capabilities(),
-- Add additional capabilities supported by nvim-cmp
capabilities = {
textDocument = {
completion = {
completionItem = {
snippetSupport = true,
preselectSupport = true,
insertReplaceSupport = true,
labelDetailsSupport = true,
deprecatedSupport = true,
commitCharactersSupport = true,
tagSupport = { valueSet = { 1 } },
resolveSupport = {
properties = {
'documentation',
'detail',
'additionalTextEdits',
},
},
},
},
},
},
}
local lsp_servers = {
@ -221,9 +243,6 @@ local lsp_servers = {
},
},
},
terraformls = {
cmd = { servers_path .. '/terraformls/terraform-ls', 'serve' },
},
texlab = {
settings = {
texlab = {
@ -301,6 +320,7 @@ local lsp_servers = {
cssls = { cmd = { servers_path .. '/vscode/node_modules/.bin/vscode-css-language-server', '--stdio' } },
-- vimls = { cmd = { servers_path .. '/vimls/node_modules/.bin/vim-language-server', '--stdio' } },
jsonnet_ls = { cmd = { servers_path .. '/jsonnet_ls/jsonnet-language-server' } },
terraformls = { cmd = { servers_path .. '/terraformls/terraform-ls', 'serve' } },
dhall_lsp_server = {},
}

View file

@ -0,0 +1,15 @@
local lspkind_icons = require('user.utils.tables').lspkind_icons
local navic_icons = {}
for key, val in pairs(lspkind_icons) do
navic_icons[key] = val.icon .. ' '
vim.api.nvim_command('highlight! link NavicIcons' .. key .. ' ' .. val.hl)
end
require('nvim-navic').setup {
icons = navic_icons,
highlight = true,
separator = '',
depth_limit = 0,
depth_limit_iindicator = '..',
}

View file

@ -47,7 +47,6 @@ local sources = {
'fish',
-- 'yamllint',
-- 'shellcheck',
-- 'typos',
-- codespell = { command = linters_path .. '/codespell/venv/bin/codespell' },
cspell = {
command = linters_path .. '/cspell/node_modules/.bin/cspell',
@ -70,11 +69,11 @@ local sources = {
-- command = linters_path .. '/proselint/venv/bin/proselint',
-- },
-- 'qmllint',
selene = {
condition = function(utils)
return utils.root_has_file('selene.toml')
end,
},
-- selene = {
-- condition = function(utils)
-- return utils.root_has_file('selene.toml')
-- end,
-- },
-- vale = { command = linters_path .. '/vale/vale' },
vint = { command = linters_path .. '/vint/venv/bin/vint' },
-- stylelint = { command = linters_path .. '/stylelint/node_modules/.bin/stylelint' },
@ -88,7 +87,6 @@ local sources = {
-- command = linters_path .. '/proselint/venv/bin/proselint',
-- },
-- 'shellcheck',
-- 'typos',
},
}

View file

@ -1,7 +1,7 @@
require('symbols-outline').setup {
highlight_hovered_item = false,
show_guides = true,
auto_preview = true,
auto_preview = false,
position = 'right',
border = vim.g.border_style,
width = 30,

View file

@ -1,5 +1,31 @@
local M = {}
M['b0o/SchemaStore.nvim'] = { opt = true }
M['kosayoda/nvim-lightbulb'] = { opt = true }
M['ray-x/lsp_signature.nvim'] = {
config = function()
require('user.modules.lsp.config.lsp_signature')
end,
opt = true,
}
M['j-hui/fidget.nvim'] = {
config = function()
require('user.modules.lsp.config.fidget')
end,
opt = true,
}
M['SmiteshP/nvim-navic'] = {
config = function()
require('user.modules.lsp.config.navic')
end,
opt = true
}
M['simrat39/inlay-hints.nvim'] = {
config = function()
require('user.modules.lsp.config.inlay-hints')
end,
opt = true,
}
M['neovim/nvim-lspconfig'] = {
event = 'BufReadPre',
wants = {
@ -7,33 +33,9 @@ M['neovim/nvim-lspconfig'] = {
'SchemaStore.nvim',
-- 'fidget.nvim',
'nvim-lightbulb',
'nvim-navic',
-- 'inlay-hints.nvim',
},
requires = {
{
'ray-x/lsp_signature.nvim',
config = function()
require('user.modules.lsp.config.lsp_signature')
end,
opt = true,
},
{ 'b0o/SchemaStore.nvim', opt = true },
-- {
-- 'j-hui/fidget.nvim',
-- config = function()
-- require('user.modules.lsp.config.fidget')
-- end,
-- opt = true,
-- },
{ 'kosayoda/nvim-lightbulb', opt = true },
-- {
-- 'simrat39/inlay-hints.nvim',
-- opt = true,
-- config = function()
-- require('user.modules.lsp.config.inlay-hints')
-- end,
-- },
},
config = function()
require('user.modules.lsp.config.lspconfig')
end,
@ -64,16 +66,15 @@ M['simrat39/symbols-outline.nvim'] = {
require('user.modules.lsp.config.symbols-outline')
end,
}
M['rcarriga/nvim-dap-ui'] = { -- TODO: config, scripts to install/update dap servers
M['mfussenegger/nvim-dap'] = { -- TODO: config, scripts to install/update dap servers
config = function()
require('user.modules.lsp.config.dap')
end,
opt = true,
}
M['rcarriga/nvim-dap-ui'] = {
keys = '<leader>d',
wants = 'nvim-dap',
requires = { {
'mfussenegger/nvim-dap',
config = function()
require('user.modules.lsp.config.dap')
end,
opt = true,
} },
config = function()
require('user.modules.lsp.config.dap-ui')
end,

View file

@ -1,6 +1,5 @@
local M = {}
local wk = require('which-key')
-- local ih = require('inlay-hints')
-- Omit 'signs' key (configured in another namespace)
local diagnostic_config = {
@ -93,9 +92,13 @@ local function setup_mappings(bufnr)
end
local function setup_formatting_mapping(client, bufnr)
if client.resolved_capabilities.document_formatting then
if client.server_capabilities.documentFormattingProvider then
wk.register({
['lo'] = { vim.lsp.buf.formatting, 'Format buffer' },
['lo'] = {
function()
vim.lsp.buf.format { async = false }
end, 'Format buffer'
},
}, { buffer = bufnr, prefix = '<leader>' })
-- vim.api.nvim_exec(
-- [[
@ -106,7 +109,7 @@ local function setup_formatting_mapping(client, bufnr)
-- ]],
-- false
-- )
elseif client.resolved_capabilities.document_range_formatting then
elseif client.server_capabilities.documentRangeFormattingProvider then
wk.register({
['lo'] = {
function()
@ -126,7 +129,7 @@ local function setup_formatting_mapping(client, bufnr)
-- )
end
if client.resolved_capabilities.document_range_formatting then
if client.server_capabilities.documentRangeFormattingProvider then
wk.register({
['lo'] = { vim.lsp.buf.range_formatting, 'Format range' },
}, { buffer = bufnr, prefix = '<leader>', mode = 'x' })
@ -134,7 +137,7 @@ local function setup_formatting_mapping(client, bufnr)
end
-- local function setup_document_highlight(client)
-- if client.resolved_capabilities.document_highlight then
-- if client.server_capabilities.documentHighlightProvider then
-- vim.api.nvim_exec(
-- [[
-- augroup lsp_document_highlight
@ -149,7 +152,7 @@ end
-- end
local function setup_codelens(client)
if client.resolved_capabilities.code_lens then
if client.server_capabilities.codeLensProvider then
vim.api.nvim_exec(
[[
augroup lsp_code_lens_refresh
@ -164,7 +167,7 @@ local function setup_codelens(client)
end
local function setup_codeaction_prompt(client)
if client.resolved_capabilities.code_action then
if client.server_capabilities.codeActionProvider then
vim.api.nvim_exec(
[[
augroup lsp_code_action_prompt
@ -177,6 +180,12 @@ local function setup_codeaction_prompt(client)
end
end
local function setup_code_symbol_context(client, bufnr)
if client.server_capabilities.documentSymbolProvider then
require('nvim-navic').attach(client, bufnr)
end
end
function M.common_on_attach(client, bufnr)
-- vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
setup_mappings(bufnr)
@ -184,30 +193,8 @@ function M.common_on_attach(client, bufnr)
setup_codeaction_prompt(client)
-- setup_document_highlight(client)
setup_formatting_mapping(client, bufnr)
-- inlay-hints.nvim
-- ih.on_attach(client, bufnr)
end
function M.common_capabilities()
local capabilities = vim.lsp.protocol.make_client_capabilities()
-- Add additional capabilities supported by nvim-cmp
local completionItem = capabilities.textDocument.completion.completionItem
completionItem.snippetSupport = true
completionItem.preselectSupport = true
completionItem.insertReplaceSupport = true
completionItem.labelDetailsSupport = true
completionItem.deprecatedSupport = true
completionItem.commitCharactersSupport = true
completionItem.tagSupport = { valueSet = { 1 } }
completionItem.resolveSupport = {
properties = {
'documentation',
'detail',
'additionalTextEdits',
},
}
return capabilities
setup_code_symbol_context(client, bufnr)
-- require('inlay-hints').on_attach(client, bufnr)
end
function M.setup_border_style()

View file

@ -1,12 +0,0 @@
require('close_buffers').setup {
-- filetype_ignore = require('user.utils.tables').filetype_exclude
preserve_window_layout = { 'this' },
next_buffer_cmd = function(windows)
require('bufferline').cycle(1)
local bufnr = vim.api.nvim_get_current_buf()
for _, window in ipairs(windows) do
vim.api.nvim_win_set_buf(window, bufnr)
end
end,
}

View file

@ -1,7 +1,6 @@
local opts = {
mkdp_refresh_slow = 1,
mkdp_filetypes = { 'markdown', 'rmd' },
-- mkdp_browser = 'qutebrowser',
mkdp_page_title = '${name}.md',
mkdp_echo_preview_url = 0,
mkdp_preview_options = {

View file

@ -1,5 +1,10 @@
local M = {}
M['nvim-telescope/telescope-symbols.nvim'] = { opt = true }
M['nvim-telescope/telescope-project.nvim'] = { opt = true }
M['nvim-telescope/telescope-file-browser.nvim'] = { opt = true }
M['nvim-telescope/telescope-fzf-native.nvim'] = { run = 'make', opt = true }
M['LinArcX/telescope-env.nvim'] = { opt = true }
M['nvim-telescope/telescope.nvim'] = { -- TODO: check out fzf-lua
keys = '<leader>fj',
cmd = 'Telescope',
@ -12,13 +17,6 @@ M['nvim-telescope/telescope.nvim'] = { -- TODO: check out fzf-lua
'telescope-fzf-native.nvim',
'telescope-env.nvim',
},
requires = {
{ 'nvim-telescope/telescope-symbols.nvim', opt = true },
{ 'nvim-telescope/telescope-project.nvim', opt = true },
{ 'nvim-telescope/telescope-file-browser.nvim', opt = true },
{ 'nvim-telescope/telescope-fzf-native.nvim', run = 'make', opt = true },
{ 'LinArcX/telescope-env.nvim', opt = true },
},
config = function()
require('user.modules.tools.config.telescope')
end,
@ -30,24 +28,20 @@ M['pwntester/octo.nvim'] = { -- TODO: colors + config
require('user.modules.tools.config.octo')
end,
}
M['sindrets/diffview.nvim'] = {
cmd = {
'DiffviewOpen',
'DiffviewClose',
'DiffviewToggleFiles',
'DiffviewFocusFiles',
},
config = function()
require('user.modules.tools.config.diffview')
end,
}
M['TimUntersberger/neogit'] = {
cmd = 'Neogit',
wants = { 'diffview.nvim', 'plenary.nvim' },
requires = {
{
'sindrets/diffview.nvim',
cmd = {
'DiffviewOpen',
'DiffviewClose',
'DiffviewToggleFiles',
'DiffviewFocusFiles',
},
config = function()
require('user.modules.tools.config.diffview')
end,
opt = true,
},
},
config = function()
require('user.modules.tools.config.neogit')
end,
@ -105,13 +99,7 @@ M['folke/persistence.nvim'] = { -- TODO: check out possession.nvim, persisted.nv
require('user.modules.tools.config.persistence')
end,
}
M['kazhala/close-buffers.nvim'] = {
cmd = { 'BDelete', 'BWipeout' },
wants = 'bufferline.nvim',
config = function()
require('user.modules.tools.config.close-buffers')
end,
}
M['famiu/bufdelete.nvim'] = { cmd = { 'Bdelete', 'Bwipeout' } }
M['sindrets/winshift.nvim'] = {
cmd = 'WinShift',
config = function()

View file

@ -1,6 +1,7 @@
local comps = require('user.modules.ui.utils.components')
local custom_tables = require('user.utils.tables')
local filetypes, buftypes = custom_tables.filetype_exclude, custom_tables.buftype_exclude
local feline = require('feline')
-- Feline's 'filetypes' and 'buftypes' take a regex value
for i, v in ipairs(filetypes) do
@ -28,12 +29,7 @@ table.insert(components.active[1], comps.filesize)
table.insert(components.active[1], comps.fileinfo)
table.insert(components.active[1], comps.lineinfo)
table.insert(components.active[1], comps.percent)
table.insert(components.active[1], comps.diagerr)
table.insert(components.active[1], comps.diagwarn)
table.insert(components.active[1], comps.diaghint)
table.insert(components.active[1], comps.diaginfo)
table.insert(components.active[3], comps.codeact)
table.insert(components.active[3], comps.lspclient)
table.insert(components.active[1], comps.codeact)
table.insert(components.active[3], comps.format)
table.insert(components.active[3], comps.encode)
table.insert(components.active[3], comps.filetype)
@ -46,7 +42,34 @@ table.insert(components.inactive[1], comps.dummy)
table.insert(components.inactive[1], comps.fileinfo)
table.insert(components.inactive[2], comps.filetype)
require('feline').setup {
-- Do the same thing for the winbar
local winbar_components = {
active = {},
inactive = {},
}
table.insert(winbar_components.active, {})
table.insert(winbar_components.active, {})
table.insert(winbar_components.active, {})
table.insert(winbar_components.inactive, {})
table.insert(winbar_components.inactive, {})
table.insert(winbar_components.inactive, {})
table.insert(winbar_components.active[1], comps.lspsymbol)
table.insert(winbar_components.active[3], comps.diagerr)
table.insert(winbar_components.active[3], comps.diagwarn)
table.insert(winbar_components.active[3], comps.diaghint)
table.insert(winbar_components.active[3], comps.diaginfo)
table.insert(winbar_components.active[3], comps.lspclient)
table.insert(winbar_components.inactive[1], comps.lspsymbol)
table.insert(winbar_components.inactive[3], comps.diagerr)
table.insert(winbar_components.inactive[3], comps.diagwarn)
table.insert(winbar_components.inactive[3], comps.diaghint)
table.insert(winbar_components.inactive[3], comps.diaginfo)
table.insert(winbar_components.inactive[3], comps.lspclient)
feline.setup {
theme = comps.normal_colors,
components = components,
vi_mode_colors = comps.vi_mode_colors,
@ -56,3 +79,12 @@ require('feline').setup {
bufnames = {},
},
}
feline.winbar.setup {
components = winbar_components,
force_inactive = {
filetypes = filetypes,
buftypes = buftypes,
bufnames = {},
},
}

View file

@ -35,3 +35,5 @@ require('which-key').setup {
show_help = true,
triggers = 'auto',
}
require('user.keymap')

View file

@ -22,6 +22,7 @@ M['akinsho/bufferline.nvim'] = {
}
M['tiagovla/scope.nvim'] = {
after = 'bufferline.nvim',
disable = vim.opt.showtabline:get() == 0 and true or false,
config = function()
require('scope').setup()
end,
@ -42,5 +43,11 @@ M['rcarriga/nvim-notify'] = {
require('user.modules.ui.config.notify')
end,
}
M['folke/which-key.nvim'] = {
event = 'VimEnter',
config = function()
require('user.modules.ui.config.which-key')
end,
}
return M

View file

@ -31,10 +31,9 @@ M['dummy'] = {
}
M['vi_mode'] = {
-- provider = function()
-- return ' ' .. vi_mode_utils.get_vim_mode()
-- end,
provider = '',
provider = function()
return '' .. vi_mode_utils.get_vim_mode()
end,
hl = function()
return {
name = vi_mode_utils.get_mode_highlight_name(),
@ -78,37 +77,6 @@ M['percent'] = {
right_sep = ' ',
}
M['diagerr'] = {
provider = 'diagnostic_errors',
icon = '',
enabled = func.is_lsp_attached,
hl = { fg = colors.red },
right_sep = ' ',
}
M['diagwarn'] = {
provider = 'diagnostic_warnings',
icon = '',
enabled = func.is_lsp_attached,
hl = { fg = colors.yellow },
right_sep = ' ',
}
M['diaghint'] = {
provider = 'diagnostic_hints',
icon = '',
enabled = func.is_lsp_attached,
hl = { fg = colors.cyan },
right_sep = ' ',
}
M['diaginfo'] = {
provider = 'diagnostic_info',
icon = '',
enabled = func.is_lsp_attached,
hl = { fg = colors.blue },
}
M['codeact'] = {
provider = function()
return require('nvim-lightbulb').get_status_text()
@ -120,18 +88,9 @@ M['codeact'] = {
hl = { fg = colors.green, style = 'bold' },
}
M['lspclient'] = {
provider = func.lsp_active_clients,
enabled = func.is_lsp_attached,
icon = ' LSP:',
hl = { fg = colors.purple, style = 'bold' },
left_sep = ' ',
}
M['format'] = {
provider = func.file_osinfo,
hl = { fg = colors.cyan },
left_sep = ' ',
}
M['encode'] = {
@ -174,4 +133,62 @@ M['diffremove'] = {
left_sep = ' ',
}
M['lspsymbol'] = {
provider = function()
local context = require('nvim-navic').get_location()
if #context ~= 0 then
return '' .. context
end
return ''
end,
enabled = function()
local navic_present, navic = pcall(require, 'nvim-navic')
if navic_present then
return navic.is_available()
end
return false
end,
right_sep = ' ',
hl = { fg = colors.fg },
}
M['diagerr'] = {
provider = 'diagnostic_errors',
icon = '',
enabled = func.is_lsp_attached,
hl = { fg = colors.red },
}
M['diagwarn'] = {
provider = 'diagnostic_warnings',
icon = '',
enabled = func.is_lsp_attached,
hl = { fg = colors.yellow },
left_sep = ' ',
}
M['diaghint'] = {
provider = 'diagnostic_hints',
icon = '',
enabled = func.is_lsp_attached,
hl = { fg = colors.cyan },
left_sep = ' ',
}
M['diaginfo'] = {
provider = 'diagnostic_info',
icon = '',
enabled = func.is_lsp_attached,
hl = { fg = colors.blue },
left_sep = ' ',
}
M['lspclient'] = {
provider = func.lsp_active_clients,
enabled = func.is_lsp_attached,
icon = ' LSP:',
hl = { fg = colors.purple },
left_sep = ' ',
}
return M

View file

@ -21,9 +21,6 @@ local global_vars = {
-- Only use python3
python3_host_prog = '/usr/bin/python3',
-- Use Lua filetype detection
did_load_filetypes = 0,
do_filetype_lua = 1,
-- Leader keys
mapleader = ' ',
maplocalleader = '\\',
@ -89,7 +86,7 @@ local vim_options = {
backspace = { 'indent', 'eol', 'start' },
showcmd = false,
-- inccommand = 'nosplit',
-- cmdheight = 2,
cmdheight = 0,
-- cmdwinheight = 6,
showtabline = 2,
laststatus = 3,
@ -115,7 +112,7 @@ local vim_options = {
winblend = 0,
-- Conceal
conceallevel = 0,
conceallevel = 2,
concealcursor = 'nc',
foldenable = false,
foldlevelstart = 99,

View file

@ -92,6 +92,10 @@ M.highlight_editor = {
TabLineFill = { fg = c.fg, bg = c.grey1 },
TabLineSel = { fg = c.cyan, bg = c.grey3 },
-- winbar
WinBar = { fg = c.fg, bg = c.black },
WinBarNC = { fg = c.fg, bg = c.grey1 },
-- window
Title = { fg = c.fg },
VertSplit = { fg = c.grey_bright },
@ -394,16 +398,12 @@ M.highlight_plugins = {
LspTroubleText = { fg = c.blue, bold = true },
-- telescope.nvim
TelescopePromptBorder = { fg = c.cyan, bold = true },
TelescopeResultsBorder = { fg = c.blue, bold = true },
TelescopePreviewBorder = { fg = c.green, bold = true },
TelescopeSelection = { fg = c.fg, bg = c.grey2 },
TelescopeMultiSelection = { fg = c.fg, bg = c.grey2, bold = true },
TelescopeSelectionCaret = { fg = c.red, bg = c.grey2, bold = true },
TelescopeBorder = { fg = c.blue },
TelescopeTitle = { fg = c.black, bg = c.blue, bold = true },
TelescopeSelection = { fg = c.fg, bg = c.grey1 },
TelescopeMultiSelection = { fg = c.fg, bg = c.grey1, bold = true },
TelescopeSelectionCaret = { fg = c.red, bg = c.grey1, bold = true },
TelescopeMatching = { fg = c.yellow, bold = true },
TelescopePromptTitle = { fg = c.black, bg = c.cyan, bold = true },
TelescopeResultsTitle = { fg = c.black, bg = c.blue, bold = true },
TelescopePreviewTitle = { fg = c.black, bg = c.green, bold = true },
-- neogit
NeogitBranch = { fg = c.purple },

View file

@ -7,20 +7,20 @@ M.border_styles = {
double = { '', '', '', '', '', '', '', '' },
}
-- For nvim-cmp and symbols-outline
-- For nvim-cmp, symbols-outline and nvim-navic
M.lspkind_icons = {
File = { icon = '', hl = 'TSURI' },
Module = { icon = '', hl = 'TSNamespace' },
Namespace = { icon = '', hl = 'TSNamespace' },
Package = { icon = '', hl = 'TSNamespace' },
Text = { icon = '', hl = 'TSString' },
Text = { icon = '', hl = 'TSString' },
Method = { icon = '', hl = 'TSMethod' },
Function = { icon = '', hl = 'TSFunction' },
Constructor = { icon = '', hl = 'TSConstructor' },
Field = { icon = '', hl = 'TSField' },
Variable = { icon = '', hl = 'TSConstant' },
Class = { icon = '', hl = 'TSType' },
Interface = { icon = '', hl = 'TSType' },
Interface = { icon = '', hl = 'TSType' },
Property = { icon = '', hl = 'TSMethod' },
Unit = { icon = '', hl = 'TSField' },
Value = { icon = '', hl = 'TSConstant' },
@ -36,12 +36,12 @@ M.lspkind_icons = {
Event = { icon = '', hl = 'TSType' },
Operator = { icon = '', hl = 'TSOperator' },
TypeParameter = { icon = '', hl = 'TSParameter' },
String = { icon = '𝓐', hl = 'TSString' },
String = { icon = '', hl = 'TSString' },
Number = { icon = '#', hl = 'TSNumber' },
Boolean = { icon = '', hl = 'TSBoolean' },
Array = { icon = '', hl = 'TSConstant' },
Object = { icon = '⦿', hl = 'TSType' },
Key = { icon = '🔐', hl = 'TSType' },
Object = { icon = '', hl = 'TSType' },
Key = { icon = '', hl = 'TSType' },
Null = { icon = '', hl = 'TSType' },
}

View file

@ -9,5 +9,5 @@
template:
src: alacritty/alacritty.j2
dest: ~/.config/alacritty/alacritty.yml
force: yes
force: true
mode: 0644

View file

@ -9,5 +9,5 @@
template:
src: amfora/config.j2
dest: ~/.config/amfora/config.toml
force: yes
force: true
mode: 0644

View file

@ -9,7 +9,7 @@
copy:
src: anime-downloader/config.json
dest: ~/.config/anime-downloader/config.json
force: yes
force: true
mode: 0644
- name: anime-downloader | Install anime-downloader with pip

View file

@ -9,5 +9,5 @@
template:
src: bat/config.j2
dest: ~/.config/bat/config
force: yes
force: true
mode: 0644

View file

@ -9,5 +9,5 @@
template:
src: btop/btop.j2
dest: ~/.config/btop/btop.conf
force: yes
force: true
mode: 0644

View file

@ -9,21 +9,21 @@
copy:
src: castero/podcasts.opml
dest: ~/.config/castero/podcasts.opml
force: yes
force: true
mode: 0644
- name: castero | Copy config
template:
src: castero/castero.j2
dest: ~/.config/castero/castero.conf
force: yes
force: true
mode: 0644
- name: castero | Check whether castero is installed
command: which castero
register: castero_check
failed_when: no
changed_when: no
failed_when: false
changed_when: false
- name: castero | Import the list of podcasts
command: castero --import ~/.config/castero/podcasts.opml

View file

@ -9,5 +9,5 @@
template:
src: cava/config.j2
dest: ~/.config/cava/config
force: yes
force: true
mode: 0644

View file

@ -21,6 +21,6 @@
lineinfile:
path: /etc/chromium/chromium.conf
search_string: 'CHROMIUM_FLAGS='
line: CHROMIUM_FLAGS="--enable-features=UseOzonePlatform --ozone-platform=wayland --disable-sync-preferences --disk-cache-dir="$XDG_RUNTIME_DIR/chromium-cache""
line: CHROMIUM_FLAGS="--ozone-platform-hint=auto --disable-sync-preferences --disk-cache-dir="$XDG_RUNTIME_DIR/chromium-cache""
state: present
mode: 0644

View file

@ -9,5 +9,5 @@
copy:
src: element-desktop/config.json
dest: ~/.config/Element/config.json
force: yes
force: true
mode: 0644

View file

@ -16,7 +16,7 @@
template:
src: emacs/config.j2
dest: ~/.config/doom/config.el
force: yes
force: true
mode: 0644
- name: emacs | Clone Doom Emacs

View file

@ -23,7 +23,7 @@
template:
src: 'fish/{{ item }}.j2'
dest: '~/.config/fish/conf.d/{{ item }}.fish'
force: yes
force: true
mode: 0644
loop:
- aliases
@ -33,7 +33,7 @@
copy:
src: 'fish/{{ item }}'
dest: '~/.config/fish/themes/{{ item }}'
force: yes
force: true
mode: 0644
loop:
- Onedark.theme
@ -52,7 +52,7 @@
template:
src: fish/config.j2
dest: ~/.config/fish/config.fish
force: yes
force: true
mode: 0644
- name: fish | Download fzf_key_bindings.fish

View file

@ -9,5 +9,5 @@
template:
src: fontconfig/fonts.j2
dest: ~/.config/fontconfig/fonts.conf
force: yes
force: true
mode: 0644

View file

@ -9,5 +9,5 @@
template:
src: foot/foot.j2
dest: ~/.config/foot/foot.ini
force: yes
force: true
mode: 0644

View file

@ -17,5 +17,5 @@
template:
src: gallery-dl/config.j2
dest: ~/.config/gallery-dl/config.json
force: yes
force: true
mode: 0600

View file

@ -1,7 +1,7 @@
---
- name: git | Create config directory
file:
path: ~/.config/git
path: ~/.config/git/templates/hooks
state: directory
mode: 0755
@ -9,5 +9,28 @@
template:
src: git/config.j2
dest: ~/.config/git/config
force: yes
force: true
mode: 0644
- name: git | Install git-privacy with pip
pip:
name: gitprivacy
virtualenv: ~/.config/git/venv
state: latest
- name: git | Symlink git-privacy executable
file:
src: ~/.config/git/venv/bin/git-privacy
dest: ~/.local/bin/git-privacy
state: link
- name: git | Install git-privacy hooks globally
copy:
src: git/{{ item }}
dest: ~/.config/git/templates/hooks/{{ item }}
mode: 0755
loop:
- post-commit
- post-rewrite
- pre-commit
- pre-push

View file

@ -9,7 +9,7 @@
copy:
src: 'glow/{{ item }}'
dest: ~/.config/glow/styles
force: yes
force: true
mode: 0644
loop:
- nord.json
@ -19,5 +19,5 @@
template:
src: glow/glow.j2
dest: ~/.config/glow/glow.yml
force: yes
force: true
mode: 0644

View file

@ -9,7 +9,7 @@
template:
src: 'gnupg/{{ item }}.j2'
dest: '~/.local/share/gnupg/{{ item }}.conf'
force: yes
force: true
mode: 0600
loop:
- gpg

View file

@ -129,7 +129,7 @@
copy:
src: bashrc
dest: ~/.bashrc
force: yes
force: true
mode: 0644
- name: Configure nushell
@ -149,7 +149,7 @@
copy:
src: starship.toml
dest: ~/.config/starship.toml
force: yes
force: true
mode: 0644
- name: Configure ssh client
@ -164,6 +164,7 @@
import_tasks: sway.yml
tags: sway
# `tags` field doesn't allow variables so hardcode possible values here
- name: Configure terminal emulators
include_tasks:
file: '{{ item }}.yml'
@ -171,8 +172,8 @@
tags:
- terminal
- '{{ item }}'
loop: '{{ terminal }}'
tags: terminal
loop: '{{ terminal_emulators }}'
tags: [terminal, foot, alacritty]
- name: Configure translate-shell
import_tasks: translate-shell.yml

View file

@ -20,7 +20,7 @@
template:
src: mpd/mpd.j2
dest: ~/.config/mpd/mpd.conf
force: yes
force: true
mode: 0644
when: music_daemon == 'mpd'
@ -28,7 +28,7 @@
template:
src: mopidy/mopidy.j2
dest: ~/.config/mopidy/mopidy.conf
force: yes
force: true
mode: 0644
when: music_daemon == 'mopidy'
@ -36,12 +36,12 @@
template:
src: mpDris2/mpDris2.j2
dest: ~/.config/mpDris2/mpDris2.conf
force: yes
force: true
mode: 0644
- name: mpd | Copy ncmpcpp config
template:
src: ncmpcpp/config.j2
dest: ~/.config/ncmpcpp/config
force: yes
force: true
mode: 0644

View file

@ -10,7 +10,7 @@
template:
src: mpv/mpv.j2
dest: ~/.config/mpv/mpv.conf
force: yes
force: true
mode: 0644
# Busybox has 'unzip' so use that
@ -90,7 +90,7 @@
copy:
src: mpv/autosubsync.conf
dest: ~/.config/mpv/script-opts/autosubsync.conf
force: yes
force: true
mode: 0644
tags: [mpv-extend, mpv-subsync]
@ -112,6 +112,6 @@
copy:
src: mpv/input.conf
dest: ~/.config/mpv/input.conf
force: yes
force: true
mode: 0644
tags: mpv-extend

View file

@ -9,12 +9,12 @@
copy:
src: newsboat/urls
dest: ~/.config/newsboat/urls
force: yes
force: true
mode: 0600
- name: newsboat | Copy config
template:
src: newsboat/config.j2
dest: ~/.config/newsboat/config
force: yes
force: true
mode: 0644

View file

@ -15,7 +15,7 @@
template:
src: dunst/dunstrc.j2
dest: ~/.config/dunst/dunstrc
force: yes
force: true
mode: 0644
when: notification == 'dunst'
@ -23,7 +23,7 @@
template:
src: mako/config.j2
dest: ~/.config/mako/config
force: yes
force: true
mode: 0644
when: notification == 'mako'
@ -31,6 +31,6 @@
template:
src: fnott/fnott.j2
dest: ~/.config/fnott/fnott.ini
force: yes
force: true
mode: 0644
when: notification == 'fnott'

View file

@ -9,5 +9,5 @@
copy:
src: npm/npmrc
dest: ~/.config/npm/npmrc
force: yes
force: true
mode: 0644

View file

@ -9,5 +9,5 @@
copy:
src: nushell/config.toml
dest: ~/.config/nu/config.toml
force: yes
force: true
mode: 0644

View file

@ -9,8 +9,8 @@
synchronize:
src: nvim/
dest: ~/.config/nvim/
recursive: yes
delete: yes
recursive: true
delete: true
- name: nvim | Create 'after/plugin' directory
file:
@ -22,14 +22,14 @@
template:
src: nvim/colors.j2
dest: ~/.config/nvim/after/plugin/colors.lua
force: yes
force: true
mode: 0644
- name: nvim | Copy custom theme for markdown-preview.nvim
template:
src: 'nvim/{{ item }}.j2'
dest: '~/.config/nvim/{{ item }}.css'
force: yes
force: true
mode: 0644
loop:
- markdown-highlight

View file

@ -9,5 +9,19 @@
synchronize:
src: pyradio/
dest: ~/.config/pyradio/
recursive: yes
delete: yes
recursive: true
delete: true
- name: pyradio | Create 'themes' directory
file:
path: ~/.config/pyradio/themes
state: directory
mode: 0755
- name: pyradio | Copy theme files
template:
src: pyradio/{{ item }}.j2
dest: ~/.config/pyradio/themes/{{ item }}
mode: 0644
loop:
- blue.pyradio-theme

View file

@ -12,7 +12,7 @@
copy:
src: 'qtcreator/{{ item }}'
dest: ~/.config/QtProject/qtcreator/themes
force: yes
force: true
mode: 0644
loop:
- nord.creatortheme
@ -22,7 +22,7 @@
copy:
src: 'qtcreator/{{ item }}'
dest: ~/.config/QtProject/qtcreator/styles
force: yes
force: true
mode: 0644
loop:
- nord.xml

View file

@ -9,7 +9,7 @@
copy:
src: 'qutebrowser/{{ item }}'
dest: ~/.config/qutebrowser
force: yes
force: true
mode: 0644
loop:
- base16-nord.py
@ -19,5 +19,5 @@
template:
src: qutebrowser/config.j2
dest: ~/.config/qutebrowser/config.py
force: yes
force: true
mode: 0644

View file

@ -9,5 +9,5 @@
copy:
src: ripgrep/config
dest: ~/.config/ripgrep/config
force: yes
force: true
mode: 0644

View file

@ -9,19 +9,19 @@
template:
src: rofi/config.j2
dest: ~/.config/rofi/config.rasi
force: yes
force: true
mode: 0644
- name: rofi | Copy file-browser-extended plugin config
copy:
src: rofi/file-browser
dest: ~/.config/rofi/file-browser
force: yes
force: true
mode: 0644
- name: rofi | Copy theme
template:
src: rofi/theme.j2
dest: '~/.config/rofi/themes/{{ theme }}.rasi'
force: yes
force: true
mode: 0644

View file

@ -9,5 +9,5 @@
copy:
src: streamlink/config
dest: ~/.config/streamlink/config
force: yes
force: true
mode: 0644

View file

@ -13,19 +13,19 @@
template:
src: swaylock/config.j2
dest: ~/.config/swaylock/config
force: yes
force: true
mode: 0644
- name: sway | Copy swaynag config
template:
src: swaynag/config.j2
dest: ~/.config/swaynag/config
force: yes
force: true
mode: 0644
- name: sway | Copy config
template:
src: sway/config.j2
dest: ~/.config/sway/config
force: yes
force: true
mode: 0644

View file

@ -9,7 +9,7 @@
template:
src: tmux/tmux.j2
dest: ~/.config/tmux/tmux.conf
force: yes
force: true
mode: 0644
- name: tmux | Install tpm

View file

@ -9,7 +9,7 @@
copy:
src: 'translate-shell/{{ item }}'
dest: ~/.config/translate-shell
force: yes
force: true
mode: 0644
loop:
- happiness.trans
@ -19,5 +19,5 @@
template:
src: translate-shell/init.j2
dest: ~/.config/translate-shell/init.trans
force: yes
force: true
mode: 0644

View file

@ -9,5 +9,5 @@
synchronize:
src: vifm/
dest: ~/.config/vifm/
recursive: yes
delete: yes
recursive: true
delete: true

View file

@ -13,7 +13,7 @@
copy:
src: 'waybar/{{ item }}'
dest: ~/.config/waybar/modules/
force: yes
force: true
mode: 0644
loop:
- media.sh
@ -26,12 +26,12 @@
template:
src: waybar/config_sway.j2
dest: ~/.config/waybar/sway/config
force: yes
force: true
mode: 0644
- name: waybar | Copy style for sway
template:
src: waybar/style_sway.j2
dest: ~/.config/waybar/sway/style.css
force: yes
force: true
mode: 0644

View file

@ -28,7 +28,7 @@
url: https://weechat.org/files/scripts/emoji.lua
dest: '{{ script_location }}/emoji.lua'
mode: 0644
force: yes
force: true
- name: weechat | Symlink emoji.lua to autoload directory
file:
@ -46,7 +46,7 @@
url: https://weechat.org/files/scripts/autosort.py
dest: '{{ script_location }}/autosort.py'
mode: 0644
force: yes
force: true
- name: weechat | Symlink autosort.py to autoload directory
file:
@ -64,7 +64,7 @@
url: https://weechat.org/files/scripts/go.py
dest: '{{ script_location }}/go.py'
mode: 0644
force: yes
force: true
- name: weechat | Symlink go.py to autoload directory
file:
@ -82,7 +82,7 @@
url: https://weechat.org/files/scripts/grep.py
dest: '{{ script_location }}/grep.py'
mode: 0644
force: yes
force: true
- name: weechat | Symlink grep.py to autoload directory
file:
@ -100,7 +100,7 @@
url: https://raw.githubusercontent.com/s3rvac/weechat-notify-send/master/notify_send.py
dest: '{{ script_location }}/notify_send.py'
mode: 0644
force: yes
force: true
- name: weechat | Symlink notify_send.py to autoload directory
file:
@ -119,7 +119,7 @@
url: https://raw.githubusercontent.com/wee-slack/wee-slack/master/wee_slack.py
dest: '{{ script_location }}/wee_slack.py'
mode: 0644
force: yes
force: true
- name: weechat | Symlink wee_slack.py to autoload directory
file:

View file

@ -9,19 +9,19 @@
template:
src: wofi/config.j2
dest: ~/.config/wofi/config
force: yes
force: true
mode: 0644
- name: wofi | Copy style
template:
src: wofi/style.j2
dest: ~/.config/wofi/style.css
force: yes
force: true
mode: 0644
- name: wofi | Install wofi-calc script
copy:
src: wofi/wofi-calc
dest: ~/.local/libexec/wayland/wofi-calc
force: yes
force: true
mode: 0755

View file

@ -9,5 +9,5 @@
template:
src: xdg-desktop-portal-wlr/config.j2
dest: ~/.config/xdg-desktop-portal-wlr/config
force: yes
force: true
mode: 0644

View file

@ -9,5 +9,5 @@
copy:
src: xonsh/rc.xsh
dest: ~/.config/xonsh/rc.xsh
force: yes
force: true
mode: 0644

View file

@ -9,5 +9,5 @@
template:
src: yt-dlp/config.j2
dest: ~/.config/yt-dlp/config
force: yes
force: true
mode: 0644

View file

@ -9,5 +9,5 @@
template:
src: ytmdl/config.j2
dest: ~/.config/ytmdl/config
force: yes
force: true
mode: 0644

View file

@ -9,5 +9,5 @@
template:
src: zathura/zathurarc.j2
dest: ~/.config/zathura/zathurarc
force: yes
force: true
mode: 0644

View file

@ -9,5 +9,5 @@
template:
src: zellij/config.j2
dest: ~/.config/zellij/config.yaml
force: yes
force: true
mode: 0644

View file

@ -25,7 +25,7 @@ window:
instance: Alacritty
general: Alacritty
gtk_theme_variant: dark
decorations_theme_variant: dark
scrolling:
history: 50000
@ -59,8 +59,6 @@ font:
x: 0
y: 0
use_thin_strokes: false
builtin_box_drawing: true
draw_bold_text_with_bright_colors: false
@ -86,9 +84,9 @@ colors:
foreground: '{{ background }}'
background: '{{ yellow }}'
bar:
background: '{{ foreground }}'
foreground: '{{ background }}'
footer_bar:
background: '{{ foreground }}'
foreground: '{{ background }}'
# Keyboard regex hints
hints:
@ -155,6 +153,8 @@ cursor:
blink_interval: 750
blink_timeout: 5
unfocused_hollow: true
thickness: 0.15
@ -184,6 +184,7 @@ hints:
enabled:
- regex: "(ipfs:|ipns:|magnet:|mailto:|gemini:|gopher:|https:|http:|news:|file:|git:|ssh:|ftp:)\
[^\u0000-\u001F\u007F-\u009F<>\"\\s{-}\\^⟨⟩`]+"
hyperlinks: true
command: /usr/bin/xdg-open
post_processing: true
mouse:
@ -231,6 +232,7 @@ key_bindings:
- { key: V, mods: Control, mode: Vi|~Search, action: ToggleBlockSelection }
- { key: V, mods: Alt, mode: Vi|~Search, action: ToggleSemanticSelection }
- { key: Return, mode: Vi|~Search, action: Open }
- { key: Z, mode: Vi|~Search, action: CenterAroundViCursor }
- { key: K, mode: Vi|~Search, action: Up }
- { key: J, mode: Vi|~Search, action: Down }
- { key: H, mode: Vi|~Search, action: Left }

View file

@ -21,6 +21,7 @@ set -gx GOPATH $XDG_DATA_HOME/go
set -gx GRADLE_USER_HOME $XDG_DATA_HOME/gradle
set -gx _JAVA_OPTIONS -Djava.util.prefs.userRoot=$XDG_CONFIG_HOME/java
set -gx NODE_REPL_HISTORY $XDG_CACHE_HOME/node_repl_history
set -gx NPM_CONFIG_PREFIX $XDG_DATA_HOME/npm
set -gx NPM_CONFIG_USERCONFIG $XDG_CONFIG_HOME/npm/npmrc
set -gx CARGO_HOME $XDG_DATA_HOME/cargo
set -gx RUSTUP_HOME $XDG_DATA_HOME/rustup
@ -68,6 +69,18 @@ set -gx GOPROXY direct
set -gx DOTNET_CLI_TELEMETRY_OPTOUT true
set -gx DOTNET_SKIP_FIRST_TIME_EXPERIENCE true
# Disable update check output in Pulumi
set -gx PULUMI_SKIP_UPDATE_CHECK true
# helmfile also has update check now :(
set -gx HELMFILE_UPGRADE_NOTICE_DISABLED true
# Configure gopass
set -gx CHECKPOINT_DISABLE true
set -gx GOPASS_NO_AUTOSYNC true
set -gx GOPASS_CLIPBOARD_COPY_CMD "$HOME/.local/libexec/gopass-clipboard-copy.sh"
set -gx GOPASS_CLIPBOARD_CLEAR_CMD "$HOME/.local/libexec/gopass-clipboard-clear.sh"
# we build Vagrant ourselves
set -gx VAGRANT_I_KNOW_WHAT_IM_DOING_PLEASE_BE_QUIET true
@ -102,6 +115,11 @@ set -gx _ZO_ECHO 1
set -gx _ZO_FZF_OPTS "$FZF_DEFAULT_OPTS --no-multi"
set -gx _ZO_RESOLVE_SYMLINKS 1
# LS_COLORS used for fd, exa, ...
if command -v vivid > /dev/null
not status is-login; and set -gx LS_COLORS (vivid generate {{ theme | capitalize }})
end
# forgit
set -gx FORGIT_COPY_CMD wl-copy
{% if ssh_client == 'dropbear' %}

View file

@ -10,7 +10,7 @@ fuzzel \
--icon-theme='{{ icon_theme }}'\
--dpi-aware=no \
--width=54 \
--terminal='{{ terminal[0] }}' \
--terminal='{{ terminal_emulators[0] }}' \
--lines=14 \
--vertical-pad=4 \
--horizontal-pad=10 \

View file

@ -22,6 +22,7 @@
prune = true
[init]
defaultBranch = main
templateDir = ~/.config/git/templates
[push]
followTags = true
[format]
@ -34,9 +35,16 @@
[submodule]
recurse = true
[alias]
l = log --graph --pretty=format:'%C(italic)%t%Creset %C(bold)<%an>%Creset -> %C(bold)%d%Creset %C(blue)%s%Creset - %C(italic)(%cr)%Creset'
l = log --all --graph --pretty=format:'%C(yellow)%t%Creset %C(bold)<%an>%Creset -%C(bold)%C(green)%d%Creset %C(blue)%s%Creset (%cr)'
br = branch --sort=-committerdate --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) %(color:bold)<%(authorname)>%(color:reset) - %(color:blue)%(contents:subject)%(color:reset) (%(committerdate:relative))'
s = status -sbu
sbu = submodule update --remote --merge
undo = reset HEAD~1 --mixed
unstage = reset HEAD
[sendemail]
annotate = true
[privacy]
ignoreTimezone = true
pattern = hms
# I should only work 2 hours a day (^-^) at noon
limit = 11-13

View file

@ -1,36 +1,36 @@
# Main foreground and background
Stations #d8dee9 #2e3440
Stations {{ foreground }} {{ background }}
# Playing station text color
Active Station #81a1c1
Active Station {{ blue }}
# Status bar foreground and background
Status Bar #2e3440 #81a1c1
Status Bar {{ background }} {{ blue }}
# Normal cursor foreground and background
Normal Cursor #2e3440 #d8dee9
Normal Cursor {{ background }} {{ foreground }}
# Cursor foreground and background
# when cursor on playing station
Active Cursor #2e3440 #81a1c1
Active Cursor {{ background }} {{ blue }}
# Text color for extra function indication
# and jump numbers within the status bar
Extra Func #8fbcbb
Extra Func {{ teal }}
# Text color for URL
PyRadio URL #a3be8c
PyRadio URL {{ green }}
# Message window border foreground and background.
# The background color can be left unset.
# Please refer to the following link for more info
# https://github.com/coderholic/pyradio#-alculated-colors
#
Messages Border #81a1c1
Messages Border {{ blue }}
# Cursor foreground and background
# This is the Line Editor cursor
Edit Cursor #2e3440 #d8dee9
Edit Cursor {{ background }} {{ foreground }}
# Theme Transparency
# Values are:

View file

@ -169,6 +169,6 @@ c.url.searchengines = {'DEFAULT': 'https://search.disroot.org/?category_general=
# Bindings ─────────────────────────────────────────────────────────────
config.bind(',m', 'hint links spawn mpv {hint-url}')
config.bind(',y', 'hint links spawn {{ terminal[0] }} -e yt-dlp {hint-url}')
config.bind(',y', 'hint links spawn {{ terminal_emulators[0] }} -e yt-dlp {hint-url}')
config.bind(',t', 'config-cycle tabs.show multiple never')
config.bind(',T', 'set-cmd-text -s :open -t')

View file

@ -141,12 +141,12 @@ local mappings = {
{
mod = 'Super',
key = 'Return',
command = { 'spawn', '{{ terminal[0] }}' },
command = { 'spawn', '{{ terminal_emulators[0] }}' },
},
{
mod = { 'Super', 'Shift' },
key = 'Return',
command = { 'spawn', '{{ terminal[1] }}' },
command = { 'spawn', '{{ terminal_emulators[1] }}' },
},
-- Application launcher
{

View file

@ -4,14 +4,14 @@ configuration {
font: "{{ monospace_font }} {{ font_size }}";
show-icons: true;
icon-theme: "{{ icon_theme }}";
terminal: "{{ terminal[0] }}";
terminal: "{{ terminal_emulators[0] }}";
{% if ssh_client == 'dropbear' %}
ssh-client: "dbclient";
{% else %}
ssh-client: "ssh";
{% endif %}
ssh-command: "{{ terminal[0] }} -e {ssh-client} {host}";
run-shell-command: "{{ terminal[0] }} -e sh -c '{cmd}; read'";
ssh-command: "{{ terminal_emulators[0] }} -e {ssh-client} {host}";
run-shell-command: "{{ terminal_emulators[0] }} -e sh -c '{cmd}; read'";
drun-display-format: "{icon} {name}";
disable-history: true;
sidebar-mode: true;

View file

@ -9,8 +9,8 @@ set $up k
set $right l
# Your preferred terminal emulator
set $term {{ terminal[0] }}
set $term_fallback {{ terminal[1] }}
set $term {{ terminal_emulators[0] }}
set $term_fallback {{ terminal_emulators[1] }}
# Your preferred application launcher
# Note: pass the final command to swaymsg so that the resulting window can be opened

View file

@ -1,7 +1,7 @@
show=drun
width=500
lines=14
term={{ terminal[0] }}
term={{ terminal_emulators[0] }}
allow_images=true
allow_markup=true
image_size={{ font_size_px | int + 6 }}

View file

@ -1,31 +0,0 @@
---
- name: flatpak | Create policy override directory
file:
path: ~/.local/share/flatpak/overrides
state: directory
mode: 0755
- name: flatpak | Copy override policies for common apps
copy:
src: '{{ item }}'
dest: '~/.local/share/flatpak/overrides/{{ item }}'
force: yes
mode: 0644
loop:
- com.github.micahflee.torbrowser-launcher
- com.github.tchx84.Flatseal
- com.github.vladimiry.ElectronMail
- com.github.wwmm.easyeffects
- com.obsproject.Studio
- global
- info.febvre.Komikku
- io.gitlab.librewolf-community
- net.jami.Jami
- org.gimp.GIMP
- org.inkscape.Inkscape
- org.kde.krita
- org.libreoffice.LibreOffice
- org.pipewire.Helvum
- org.qbittorrent.qBittorrent
- org.remmina.Remmina
- org.rncbc.qpwgraph

View file

@ -1,4 +1,28 @@
---
flatpak_remotes:
flathub: https://dl.flathub.org/repo/flathub.flatpakrepo
kdeapps: https://distribute.kde.org/kdeapps.flatpakrepo
flatpak_applications:
- com.github.micahflee.torbrowser-launcher
- com.github.tchx84.Flatseal
- com.github.vladimiry.ElectronMail
- com.github.wwmm.easyeffects
- com.obsproject.Studio
- com.usebottles.bottles
- info.febvre.Komikku
- io.gitlab.librewolf-community
- me.kozec.syncthingtk
- net.jami.Jami
- org.gimp.GIMP
- org.inkscape.Inkscape
- org.kde.krita
- org.libreoffice.LibreOffice
- org.pipewire.Helvum
- org.qbittorrent.qBittorrent
- org.remmina.Remmina
- org.rncbc.qpwgraph
# Installation directories
infrahq_dir: ~/Code/infrahq
kubevirt_dir: ~/Code/kubevirt
@ -29,6 +53,7 @@ system_apk_packages:
- automake
- bash
- bat
- below
- bettercap
- bombadillo
- borgbackup
@ -285,6 +310,7 @@ system_apk_packages:
- viddy
- vieb
- vifm
- vivid
- vulkan-loader
- wavemon
- waybar

Some files were not shown because too many files have changed in this diff Show more