Compare commits

..

5 commits

Author SHA1 Message Date
b45296765a
nvim: Hide virtual-text diagnostics on insert
When writing something we often want to ideally hide the long comments
added to the end of any line in-progress as virtual text currently.

This simply adds an auto-command to hide when entering and show again
when exiting insert mode, simple but hopefully useful.
2023-11-15 13:28:35 +01:00
c3fe4cdc58
nvim: Add mapping to toggle buffer diagnostics
If you want to hide buffer diagnostics for any reason, there is now a
quick mapping reachable through the usual lsp submenu: `<localleader>lo`
(I suppose the mnemonic would be 'lsp off').

It toggles them enabled and disabled and only affects the current
buffer.
2023-11-15 13:22:19 +01:00
5e2239ac10
repo: Remove leftover gitlab ci instructions 2023-10-23 10:29:20 +02:00
e4b560cc7f
flavours: Target new sioyek version
Sioyek features an option to set the background color for normal
operations (`background_color`) and for custom color mode
(`custom_color_mode_empty_background_color`) separately since this
commit:

0c2251b1be

Here, we change flavours to *only* target the custom color mode, leaving
the normal background color as it is.
This will not work yet for the current official sioyek 2.0 release which
is still the release for archlinux as of 2023-10-16, but it will already
work for its git release. Should work for everything as of the next
official sioyek release.
2023-10-16 11:26:31 +02:00
835acd40ab
multimedia: Move access tokens to dotter templating
Moved usernames and passwords into local variables in dotter
to be able to commit the files nonetheless. Thus makes use
of dotter templating for beets and mopidy.

Empty example configuration can be found in local.toml in the
dotter directory.
2023-10-12 09:19:31 +02:00
6 changed files with 29 additions and 39 deletions

View file

@ -4,3 +4,10 @@ packages = ["workstation"]
[files] [files]
[variables] [variables]
multimedia_beets_musicbrainz_user = ""
multimedia_beets_musicbrainz_pass = ""
multimedia_mopidy_subidy_url = ""
multimedia_mopidy_subidy_user = ""
multimedia_mopidy_subidy_pass = ""

View file

@ -1,37 +0,0 @@
---
# install moreutils to enable ifne (if not empty)
# will only run the respective analyzers when files to test
# are acutally found
image: fnichol/check-shell:latest
analyze:
stage: test
before_script:
- apk add moreutils
- shellcheck --version
script:
- echo "--------- CHECKING POSIX SHELLSCRIPTS -------------"
- find . -type f -name '*.sh' | ifne xargs shellcheck -Calways
- echo "--------- CHECKING ZSH SHELLSCRIPTS -------------"
- find . -type f -name '*.zsh' | ifne xargs shellcheck -Calways -s bash -e SC2034
lint:
stage: test
before_script:
- apk add moreutils
- shfmt -version
script:
- echo "--------- CHECKING POSIX SHELLSCRIPTS -------------"
- find . -type f -name '*.sh' -not -path '*/pomo-app/*' | ifne xargs shfmt -d -i 4
- echo "--------- CHECKING ZSH SHELLSCRIPTS -------------"
- find . -type f -name '*.zsh' -not -path '*/pomo-app/*' | ifne xargs shfmt -d -i 4
test:
stage: test
image: alpine
before_script:
- apk add git bash
- git clone https://github.com/bats-core/bats-core.git /bats
- /bats/bin/bats --version
script:
- /bats/bin/bats -r .

View file

@ -3,6 +3,7 @@
# {{scheme-name}} scheme by{{scheme-author}} # {{scheme-name}} scheme by{{scheme-author}}
custom_background_color #{{base00-hex}} custom_background_color #{{base00-hex}}
custom_color_mode_empty_background_color #{{base00-hex}}
custom_text_color #{{base06-hex}} custom_text_color #{{base06-hex}}
page_separator_color #{{base00-hex}} page_separator_color #{{base00-hex}}
@ -13,7 +14,6 @@ ui_text_color #{{base06-hex}}
ui_selected_text_color #{{base06-hex}} ui_selected_text_color #{{base06-hex}}
ui_background_color #{{base01-hex}} ui_background_color #{{base01-hex}}
ui_selected_background_color #{{base03-hex}} ui_selected_background_color #{{base03-hex}}
background_color #{{base00-hex}}
visual_mark_color {{base03-dec-r}} {{base03-dec-g}} {{base03-dec-b}} 0.2 visual_mark_color {{base03-dec-r}} {{base03-dec-g}} {{base03-dec-b}} 0.2
text_highlight_color #{{base03-hex}} text_highlight_color #{{base03-hex}}
link_highlight_color #{{base0D-hex}} link_highlight_color #{{base0D-hex}}

View file

@ -48,6 +48,8 @@ item_fields:
musicbrainz: musicbrainz:
extra_tags: [year, catalognum, country, media, label] extra_tags: [year, catalognum, country, media, label]
user: {{multimedia_beets_musicbrainz_user}}
pass: {{multimedia_beets_musicbrainz_pass}}
auto: yes auto: yes
remove: yes remove: yes

View file

@ -146,7 +146,7 @@ enabled = false
#default_playlist_scheme = m3u #default_playlist_scheme = m3u
[local] [local]
#enabled = true enabled = false
#max_search_results = 100 #max_search_results = 100
media_dir = $XDG_MUSIC_DIR media_dir = $XDG_MUSIC_DIR
scan_timeout = 5000 scan_timeout = 5000
@ -182,6 +182,11 @@ scan_timeout = 5000
# *.jpeg # *.jpeg
# *.png # *.png
[subidy]
url={{multimedia_mopidy_subidy_url}}
username={{multimedia_mopidy_subidy_user}}
password={{multimedia_mopidy_subidy_pass}}
[mpris] [mpris]
#enabled = true #enabled = true
#bus_type = session #bus_type = session

View file

@ -109,12 +109,24 @@ local function on_attach(client, bufnr)
"<cmd>lua vim.lsp.buf.signature_help()<cr>", "<cmd>lua vim.lsp.buf.signature_help()<cr>",
{ buffer = bufnr, desc = "Signature help" } { buffer = bufnr, desc = "Signature help" }
) )
map("n", "<localleader>lo", function()
if vim.diagnostic.is_disabled(0) then
vim.diagnostic.enable(0)
else
vim.diagnostic.disable(0)
end
end, { buffer = bufnr, desc = "Disable buffer diagnostics" })
if vim.g.format_on_save then if vim.g.format_on_save then
require("lsp-setup.utils").format_on_save(client) require("lsp-setup.utils").format_on_save(client)
end end
end end
-- Display diagnostics as virtual text only if not in insert mode
-- https://lr.artemislena.eu/r/neovim/comments/12inp4c/disable_diagnostics_virtual_text_when_in_insert/jqqifwk/
vim.api.nvim_create_autocmd("InsertEnter", { callback = function() vim.diagnostic.config({ virtual_text = false, }) end })
vim.api.nvim_create_autocmd("InsertLeave", { callback = function() vim.diagnostic.config({ virtual_text = true, }) end })
lsp.setup({ lsp.setup({
default_mappings = false, default_mappings = false,
servers = servers, servers = servers,
@ -196,3 +208,4 @@ require("mason-null-ls").setup({
end, end,
}, },
}) })