commit 800f08ef15a0d4b0d5f63b2ddeb005945b58976d
parent 24625c2e5582b7fb67700121b296be65b469230e
Author: Szymon Mikulicz <szymon.mikulicz@aptiv.com>
Date: Thu, 2 Nov 2023 10:14:32 +0000
New aur-cleanup + neovim changes
Diffstat:
4 files changed, 45 insertions(+), 32 deletions(-)
diff --git a/fish/.config/fish/functions/aur-cleanup.fish b/fish/.config/fish/functions/aur-cleanup.fish
@@ -3,29 +3,35 @@ function aur-cleanup
msg1 "Cleaning pacman cache..."
sudo pacman -Sc --noconfirm
msg1 "Rebuilding custom repositories..."
- for repo in /var/cache/pacman/*custom*
- cd $repo
- set reponame (basename $repo)
- rm $reponame.db*
- set pkgs *.pkg.tar.xz
- repo-add -n $reponame.db.tar $pkgs
+ set repos (awk '{
+ if ($1 ~ /\[.*\]/) {
+ name = gensub(/\[(.*)\]/, "\\\\1", 1, $1)
+ } else if ($1 ~ /Server/) {
+ sub(/.*Server.*=.*file:\/\//, "");
+ print name ":" $0
+ }
+ }' /etc/pacman.conf)
+
+ for i in (seq (count $repos))
+ set reponames[$i] (echo $repos[$i] | cut -d':' -f1)
+ set repodirs[$i] (echo $repos[$i] | cut -d':' -f2)
+ set pkgs $repodirs[$i]/*.pkg.tar.xz
+ rm $repodirs[$i]/$reponames[$i].db.tar
+ repo-add -n $repodirs[$i]/$reponames[$i].db.tar $pkgs
end
sudo pacman -Sy
msg1 "Cleaning aur sync cache..."
- cd ~/.cache/aurutils/sync
- for dir in *
+ for dir in ~/.cache/aurutils/sync/*
set pkgname (bash -c "source $dir/PKGBUILD;"'echo $pkgname')
if not pacman -Qi $pkgname >/dev/null 2>/dev/null
- echo "Removing $dir..."
+ echo Removing $dir...
rm -rf -- $dir
else
set reponame (pacman -Ss '^'(string escape --style=regex $pkgname)'$' | head -1 | sed 's@/.*$@@g')
- if string match -q 'custom*' $reponame
- cd $dir
- git clean -xdf
- cd ..
+ if contains $reponame $reponames
+ git -C $dir clean -xdf
else
- echo "Removing $dir..."
+ echo Removing $dir...
rm -rf -- $dir
end
end
diff --git a/nvim/.config/nvim/ginit.vim b/nvim/.config/nvim/ginit.vim
@@ -11,8 +11,8 @@ elseif exists('g:fvim_loaded')
nnoremap <A-CR> :FVimToggleFullScreen<CR>
endif
-let s:font = "Fira\\ Code"
-let s:fontsize = 9
+let s:font = "CodeNewRoman\\ Nerd\\ Font"
+let s:fontsize = 11
:execute "set guifont=" . s:font . ":h" . s:fontsize
function! AdjustFontSize(amount)
@@ -25,4 +25,4 @@ noremap <C-ScrollWheelDown> :call AdjustFontSize(-1)<CR>
inoremap <C-ScrollWheelUp> <Esc>:call AdjustFontSize(1)<CR>a
inoremap <C-ScrollWheelDown> <Esc>:call AdjustFontSize(-1)<CR>a
-let g:neovide_transparency=0.9
+let g:neovide_transparency=0.6
diff --git a/nvim/.config/nvim/init.vim b/nvim/.config/nvim/init.vim
@@ -6,6 +6,8 @@ autocmd BufNewFile,BufRead *.fish set filetype=fish
autocmd BufNewFile,BufRead Jenkinsfile,*.Jenkinsfile set filetype=groovy
+autocmd BufNewFile,BufRead *.bats set filetype=sh
+
autocmd CompleteDone * silent! pclose
set termguicolors
diff --git a/nvim/.config/nvim/lua/plugins.lua b/nvim/.config/nvim/lua/plugins.lua
@@ -30,10 +30,16 @@ require('packer').startup(function(use)
}
use { "nvimdev/guard.nvim",
+ requires = {
+ 'nvimdev/guard-collection',
+ },
config = function()
local ft = require('guard.filetype')
- ft('cpp'):fmt('clang-format')
+ ft('cpp'):fmt({
+ cmd = '/opt/clang/latest/bin/clang-format',
+ stdin = true,
+ })
ft('c'):fmt('clang-format')
require('guard').setup({
@@ -126,14 +132,13 @@ require('packer').startup(function(use)
end
}
+ use 'vimwiki/vimwiki'
+
use 'godlygeek/tabular'
use { "lukas-reineke/indent-blankline.nvim",
config = function()
- require("indent_blankline").setup {
- show_current_context = true,
- show_current_context_start = true,
- }
+ require("ibl").setup()
end
}
use 'chaoren/vim-wordmotion'
@@ -151,23 +156,23 @@ require('packer').startup(function(use)
requires = { 'creativenull/efmls-configs-nvim' },
config = function()
local lspconfig = require("lspconfig");
- lspconfig.clangd.setup{}
- lspconfig.zls.setup{}
- lspconfig.efm.setup{
- settings = {
- rootMarkers = { '.git/' },
- languages = {
- sh = { require('efmls-configs.linters.shellcheck') },
- },
- },
- filetypes = { 'sh' }
+ lspconfig.clangd.setup{
+ cmd = { "/opt/clang/latest/bin/clangd" },
}
+ lspconfig.pylsp.setup{}
+ lspconfig.zls.setup{}
+ lspconfig.bashls.setup{}
end
}
use { 'Shougo/ddc-source-nvim-lsp',
requires = {'Shougo/ddc.vim', 'neovim/nvim-lspconfig'}
}
+ use { 'vim-denops/denops.vim',
+ config = function()
+ -- vim.g.denops_server_addr = '127.0.0.1:32123'
+ end
+ }
use { 'Shougo/ddc.vim',
requires = {