From a5aa0396714000797fe2290bd7aafa1b24a978b7 Mon Sep 17 00:00:00 2001 From: Sonny Bakker Date: Thu, 23 May 2024 20:49:34 +0200 Subject: [PATCH] Remove timestamps, remove konsole setup and update neovim packages --- requirements.yml | 4 -- tasks/main.yml | 17 ----- templates/konsole.colorscheme.j2 | 96 ------------------------- templates/konsole.config.j2 | 26 ------- templates/konsole.profile.j2 | 19 ----- templates/nvim/init.lua.j2 | 2 - templates/nvim/lua/auto-commands.lua.j2 | 4 +- templates/nvim/lua/git-signs.lua.j2 | 2 - templates/nvim/lua/keybindings.lua.j2 | 2 - templates/nvim/lua/lsp.lua.j2 | 21 ++++-- templates/nvim/lua/lua-line.lua.j2 | 22 +++++- templates/nvim/lua/nvim-cmp.lua.j2 | 2 - templates/nvim/lua/options.lua.j2 | 2 - templates/nvim/lua/tree-sitter.lua.j2 | 2 - vars.yml | 5 ++ 15 files changed, 40 insertions(+), 186 deletions(-) delete mode 100644 templates/konsole.colorscheme.j2 delete mode 100644 templates/konsole.config.j2 delete mode 100644 templates/konsole.profile.j2 diff --git a/requirements.yml b/requirements.yml index 276b569..ba54c45 100644 --- a/requirements.yml +++ b/requirements.yml @@ -2,7 +2,3 @@ name: common version: master scm: git -- src: git+https://git.fudiggity.nl/ansible/npm.git - name: npm - version: master - scm: git diff --git a/tasks/main.yml b/tasks/main.yml index ba2758c..727dc5d 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -20,20 +20,3 @@ update: true version: master when: githook_ssh_clone.failed - -- name: copy konsole configuration files - template: - src: '{{ item.src }}' - dest: '{{ item.dest }}' - mode: '0600' - force: true - loop: - - { - src: 'templates/konsole.profile.j2', - dest: '{{ xdg_data_dir }}/konsole/Standard.profile', - } - - { - src: 'templates/konsole.colorscheme.j2', - dest: '{{ xdg_data_dir }}/konsole/BlackOnWhite.colorscheme', - } - - { src: 'templates/konsole.config.j2', dest: '{{ xdg_config_dir }}/konsolerc' } diff --git a/templates/konsole.colorscheme.j2 b/templates/konsole.colorscheme.j2 deleted file mode 100644 index 4aed044..0000000 --- a/templates/konsole.colorscheme.j2 +++ /dev/null @@ -1,96 +0,0 @@ -[Background] -Color=255,255,255 - -[BackgroundFaint] -Color=255,255,255 - -[BackgroundIntense] -Color=255,255,255 - -[Color0] -Color=62,62,62 - -[Color0Faint] -Color=170,170,170 - -[Color0Intense] -Color=104,104,104 - -[Color1] -Color=178,24,24 - -[Color1Faint] -Color=224,142,142 - -[Color1Intense] -Color=255,84,84 - -[Color2] -Color=24,178,24 - -[Color2Faint] -Color=142,224,142 - -[Color2Intense] -Color=84,255,84 - -[Color3] -Color=229,133,31 - -[Color3Faint] -Color=224,224,142 - -[Color3Intense] -Color=194,164,255 - -[Color4] -Color=24,24,178 - -[Color4Faint] -Color=142,142,224 - -[Color4Intense] -Color=84,84,255 - -[Color5] -Color=178,24,178 - -[Color5Faint] -Color=224,142,224 - -[Color5Intense] -Color=255,84,255 - -[Color6] -Color=24,178,178 - -[Color6Faint] -Color=142,224,224 - -[Color6Intense] -Color=84,255,255 - -[Color7] -Color=58,58,58 - -[Color7Faint] -Color=142,142,142 - -[Color7Intense] -Color=255,255,255 - -[Foreground] -Color=36,36,36 - -[ForegroundFaint] -Color=0,0,0 - -[ForegroundIntense] -Color=0,0,0 - -[General] -Blur=false -ColorRandomization=false -Description=Black on White -Opacity=1 -Wallpaper= diff --git a/templates/konsole.config.j2 b/templates/konsole.config.j2 deleted file mode 100644 index 80f3a66..0000000 --- a/templates/konsole.config.j2 +++ /dev/null @@ -1,26 +0,0 @@ -# {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }} - -[Desktop Entry] -DefaultProfile=Standard.profile - -[DownloadDialog Settings] -Height 1080=494 -Width 1920=700 - -[Favorite Profiles] -Favorites=Standard.profile - -[KonsoleWindow] -ShowMenuBarByDefault=false - -[MainWindow] -MenuBar=Disabled -State=AAAA/wAAAAD9AAAAAAAAB4AAAAQbAAAABAAAAAQAAAAIAAAACPwAAAAA -ToolBarsMovable=Disabled -Width 1920=1415 - -[Notification Messages] -CloseAllTabs=true - -[TabBar] -TabBarPosition=Top diff --git a/templates/konsole.profile.j2 b/templates/konsole.profile.j2 deleted file mode 100644 index 5200f74..0000000 --- a/templates/konsole.profile.j2 +++ /dev/null @@ -1,19 +0,0 @@ -# {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }} - -[Appearance] -BoldIntense=false -ColorScheme=BlackOnWhite -Font=IBM Plex Mono,11,-1,5,57,0,0,0,0,0,Medium -UseFontLineChararacters=true - -[Cursor Options] -CursorShape=0 - -[General] -Environment=TERM=xterm-256color,COLORTERM=truecolor -Name=Standard -Parent=FALLBACK/ -StartInCurrentSessionDir=true - -[Terminal Features] -BlinkingCursorEnabled=true diff --git a/templates/nvim/init.lua.j2 b/templates/nvim/init.lua.j2 index 8b29322..6e4e1b5 100644 --- a/templates/nvim/init.lua.j2 +++ b/templates/nvim/init.lua.j2 @@ -1,5 +1,3 @@ --- {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }} - require('options') require('lsp') require('nvim-cmp') diff --git a/templates/nvim/lua/auto-commands.lua.j2 b/templates/nvim/lua/auto-commands.lua.j2 index bdaa7c8..d55530b 100644 --- a/templates/nvim/lua/auto-commands.lua.j2 +++ b/templates/nvim/lua/auto-commands.lua.j2 @@ -1,7 +1,5 @@ --- {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }} - --colorscheme -vim.cmd('colorscheme edge') +vim.cmd('colorscheme catppuccin-latte') --enable this option here as the events are used in this buffer vim.cmd('syntax on') diff --git a/templates/nvim/lua/git-signs.lua.j2 b/templates/nvim/lua/git-signs.lua.j2 index 9af8e6d..d290a1d 100644 --- a/templates/nvim/lua/git-signs.lua.j2 +++ b/templates/nvim/lua/git-signs.lua.j2 @@ -1,5 +1,3 @@ --- {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }} - local gitsigns = require('gitsigns'); gitsigns.setup({ diff --git a/templates/nvim/lua/keybindings.lua.j2 b/templates/nvim/lua/keybindings.lua.j2 index cd90748..23c272a 100644 --- a/templates/nvim/lua/keybindings.lua.j2 +++ b/templates/nvim/lua/keybindings.lua.j2 @@ -1,5 +1,3 @@ --- {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }} - local opts = {noremap=true, silent=true} vim.api.nvim_set_keymap('n', '', ':NERDTreeToggle', opts) diff --git a/templates/nvim/lua/lsp.lua.j2 b/templates/nvim/lua/lsp.lua.j2 index bd8835b..fae11d3 100644 --- a/templates/nvim/lua/lsp.lua.j2 +++ b/templates/nvim/lua/lsp.lua.j2 @@ -1,5 +1,3 @@ --- {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }} - --use an on_attach function to only map the following keys --after the language server attaches to the current buffer local on_attach = function(client, bufnr) @@ -42,6 +40,11 @@ end local util = require('lspconfig/util') +local python_root_dir = function(fname) + return util.root_pattern('.git', 'setup.cfg', 'requirements')(fname) or + util.path.dirname(fname) +end + nvim_lsp.pylsp.setup({ on_attach = on_attach, capabilities = capabilities, @@ -55,10 +58,16 @@ nvim_lsp.pylsp.setup({ } } }, - root_dir = function(fname) - return util.root_pattern('.git', 'setup.cfg', 'requirements')(fname) or - util.path.dirname(fname) - end + root_dir = python_root_dir +}) + +local pyright_capabilities = vim.lsp.protocol.make_client_capabilities() +pyright_capabilities.textDocument.publishDiagnostics.tagSupport.valueSet = { 2 } + +nvim_lsp.pyright.setup({ + on_attach = on_attach, + capabilities = pyright_capabilities, + root_dir = python_root_dir }) nvim_lsp.html.setup({ diff --git a/templates/nvim/lua/lua-line.lua.j2 b/templates/nvim/lua/lua-line.lua.j2 index aa2fbfe..6ac78e1 100644 --- a/templates/nvim/lua/lua-line.lua.j2 +++ b/templates/nvim/lua/lua-line.lua.j2 @@ -1,5 +1,21 @@ --- {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }} - local lualine = require('lualine'); -lualine.setup({}) +lualine.setup { + sections = { + lualine_a = {'mode'}, + lualine_b = {'branch', 'diff', 'diagnostics'}, + lualine_c = { + { + 'filename', + path = 1, + } + }, + lualine_x = { + 'encoding', + 'fileformat', + 'filetype' + }, + lualine_y = {'progress'}, + lualine_z = {'location'} + }, +} diff --git a/templates/nvim/lua/nvim-cmp.lua.j2 b/templates/nvim/lua/nvim-cmp.lua.j2 index 38ad7f2..385ac54 100644 --- a/templates/nvim/lua/nvim-cmp.lua.j2 +++ b/templates/nvim/lua/nvim-cmp.lua.j2 @@ -1,5 +1,3 @@ --- {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }} - local cmp = require('cmp') cmp.setup { diff --git a/templates/nvim/lua/options.lua.j2 b/templates/nvim/lua/options.lua.j2 index 7e74ef2..12a7de4 100644 --- a/templates/nvim/lua/options.lua.j2 +++ b/templates/nvim/lua/options.lua.j2 @@ -1,5 +1,3 @@ --- {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }} - -- fix different locale settings when ssh'ing vim.o.encoding = 'utf-8' diff --git a/templates/nvim/lua/tree-sitter.lua.j2 b/templates/nvim/lua/tree-sitter.lua.j2 index ec0f9eb..c043391 100644 --- a/templates/nvim/lua/tree-sitter.lua.j2 +++ b/templates/nvim/lua/tree-sitter.lua.j2 @@ -1,5 +1,3 @@ --- {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }} - -- Tree sitter language parsers are installed automatically (through `auto_install`). -- To update installed parsers use `:TSUpdate {language}`. -- See https://github.com/nvim-treesitter/nvim-treesitter for more info. diff --git a/vars.yml b/vars.yml index 32ec4cf..e7de5f4 100644 --- a/vars.yml +++ b/vars.yml @@ -60,6 +60,11 @@ neovim_plugins: - { url: 'https://github.com/lewis6991/gitsigns.nvim', name: 'gitsigns.nvim' } - { url: 'https://github.com/sainnhe/edge', name: 'edge' } - { url: 'https://github.com/nvim-lualine/lualine.nvim', name: 'lualine' } + - { + url: 'https://github.com/catppuccin/nvim', + name: 'catppuccin', + version: '045e3499d9ec8d84635fb08877ae44fd33f6a38d', + } language_servers: - ansible-language-server