From 04d720f6c84d52445a0808fffae553b37408a4a2 Mon Sep 17 00:00:00 2001 From: pablu Date: Fri, 19 Jun 2026 00:37:46 +0200 Subject: only smart-nav on gentoo, and not on other systems, same with tmux navigation --- dot_config/nvim/lua/plugins/catppuccin.lua | 6 ++-- dot_config/nvim/lua/plugins/dap.lua | 44 ++++++++++++++---------------- dot_config/nvim/lua/plugins/lsp.lua | 2 +- dot_config/nvim/lua/plugins/lualine.lua | 10 ------- dot_config/nvim/lua/plugins/telescope.lua | 6 ++-- dot_config/nvim/lua/plugins/tmux.lua | 15 ---------- dot_config/nvim/lua/plugins/tmux.lua.tmpl | 19 +++++++++++++ dot_config/nvim/lua/plugins/which-key.lua | 9 ++---- 8 files changed, 50 insertions(+), 61 deletions(-) delete mode 100644 dot_config/nvim/lua/plugins/tmux.lua create mode 100644 dot_config/nvim/lua/plugins/tmux.lua.tmpl (limited to 'dot_config/nvim/lua/plugins') diff --git a/dot_config/nvim/lua/plugins/catppuccin.lua b/dot_config/nvim/lua/plugins/catppuccin.lua index 772b80e..b60a0e4 100644 --- a/dot_config/nvim/lua/plugins/catppuccin.lua +++ b/dot_config/nvim/lua/plugins/catppuccin.lua @@ -5,9 +5,9 @@ return priority = 1000, lazy = false, config = function() - -- require("catppuccin").setup({ - -- transparent_background = true, - -- }) + require("catppuccin").setup({ + transparent_background = true, + }) vim.cmd.colorscheme "catppuccin" end diff --git a/dot_config/nvim/lua/plugins/dap.lua b/dot_config/nvim/lua/plugins/dap.lua index 6d63dfa..1314be1 100644 --- a/dot_config/nvim/lua/plugins/dap.lua +++ b/dot_config/nvim/lua/plugins/dap.lua @@ -27,31 +27,29 @@ return { }) -- Configurations - dap.configurations = { - python = { - { - -- The first three options are required by nvim-dap - type = "python", -- the type here established the link to the adapter definition: `dap.adapters.python` - request = "launch", - name = "Launch file", + dap.configurations.python = { + { + -- The first three options are required by nvim-dap + type = "python", -- the type here established the link to the adapter definition: `dap.adapters.python` + request = "launch", + name = "Launch file", - -- Options below are for debugpy, see https://github.com/microsoft/debugpy/wiki/Debug-configuration-settings for supported options + -- Options below are for debugpy, see https://github.com/microsoft/debugpy/wiki/Debug-configuration-settings for supported options - program = "${file}", -- This configuration will launch the current file if used. - pythonPath = function() - -- debugpy supports launching an application with a different interpreter then the one used to launch debugpy itself. - -- The code below looks for a `venv` or `.venv` folder in the current directly and uses the python within. - -- You could adapt this - to for example use the `VIRTUAL_ENV` environment variable. - local cwd = vim.fn.getcwd() - if vim.fn.executable(cwd .. "/venv/bin/python") == 1 then - return cwd .. "/venv/bin/python" - elseif vim.fn.executable(cwd .. "/.venv/bin/python") == 1 then - return cwd .. "/.venv/bin/python" - else - return "/usr/bin/python" - end - end, - }, + program = "${file}", -- This configuration will launch the current file if used. + pythonPath = function() + -- debugpy supports launching an application with a different interpreter then the one used to launch debugpy itself. + -- The code below looks for a `venv` or `.venv` folder in the current directly and uses the python within. + -- You could adapt this - to for example use the `VIRTUAL_ENV` environment variable. + local cwd = vim.fn.getcwd() + if vim.fn.executable(cwd .. "/venv/bin/python") == 1 then + return cwd .. "/venv/bin/python" + elseif vim.fn.executable(cwd .. "/.venv/bin/python") == 1 then + return cwd .. "/.venv/bin/python" + else + return vim.fn.exepath("python") + end + end, }, } diff --git a/dot_config/nvim/lua/plugins/lsp.lua b/dot_config/nvim/lua/plugins/lsp.lua index 78c93dd..aa4388a 100644 --- a/dot_config/nvim/lua/plugins/lsp.lua +++ b/dot_config/nvim/lua/plugins/lsp.lua @@ -7,7 +7,7 @@ return { "gopls", "html", "yamlls", - "svelte-language-server", + "svelte", "clangd", "ansiblels", "vtsls", diff --git a/dot_config/nvim/lua/plugins/lualine.lua b/dot_config/nvim/lua/plugins/lualine.lua index 68bb97d..71522da 100644 --- a/dot_config/nvim/lua/plugins/lualine.lua +++ b/dot_config/nvim/lua/plugins/lualine.lua @@ -6,16 +6,6 @@ return { -- options = { -- theme = 'catppuccin' -- }, - sections = { - lualine_x = { - function() - return require('direnv').statusline() - end, - 'encoding', - 'fileformat', - 'filetype', - } - } }) end } diff --git a/dot_config/nvim/lua/plugins/telescope.lua b/dot_config/nvim/lua/plugins/telescope.lua index 9134656..d5b89d1 100644 --- a/dot_config/nvim/lua/plugins/telescope.lua +++ b/dot_config/nvim/lua/plugins/telescope.lua @@ -6,9 +6,6 @@ return { 'BurntSushi/ripgrep', { 'nvim-telescope/telescope-fzf-native.nvim', build = 'make' } }, - }, - { - 'nvim-telescope/telescope-ui-select.nvim', config = function() local telescope = require("telescope") telescope.setup({ @@ -28,5 +25,8 @@ return { telescope.load_extension("ui-select") telescope.load_extension("fzf") end + }, + { + 'nvim-telescope/telescope-ui-select.nvim', } } diff --git a/dot_config/nvim/lua/plugins/tmux.lua b/dot_config/nvim/lua/plugins/tmux.lua deleted file mode 100644 index 2b859f8..0000000 --- a/dot_config/nvim/lua/plugins/tmux.lua +++ /dev/null @@ -1,15 +0,0 @@ -return { - 'alexghergh/nvim-tmux-navigation', - config = function() - require 'nvim-tmux-navigation'.setup { - disable_when_zoomed = false, -- defaults to false - keybindings = { - left = "", - down = "", - up = "", - right = "", - last_active = "", - } - } - end -} diff --git a/dot_config/nvim/lua/plugins/tmux.lua.tmpl b/dot_config/nvim/lua/plugins/tmux.lua.tmpl new file mode 100644 index 0000000..5c73b6c --- /dev/null +++ b/dot_config/nvim/lua/plugins/tmux.lua.tmpl @@ -0,0 +1,19 @@ +{{ if ne .chezmoi.hostname "gentoo" }} +return { + 'alexghergh/nvim-tmux-navigation', + config = function() + require 'nvim-tmux-navigation'.setup { + disable_when_zoomed = false, -- defaults to false + keybindings = { + left = "", + down = "", + up = "", + right = "", + last_active = "", + } + } + end +} +{{ else }} +return {} +{{ end }} diff --git a/dot_config/nvim/lua/plugins/which-key.lua b/dot_config/nvim/lua/plugins/which-key.lua index 62125fe..7db392f 100644 --- a/dot_config/nvim/lua/plugins/which-key.lua +++ b/dot_config/nvim/lua/plugins/which-key.lua @@ -1,11 +1,7 @@ return { "folke/which-key.nvim", event = "VeryLazy", - opts = { - -- your configuration comes here - -- or leave it empty to use the default settings - -- refer to the configuration section below - }, + opts = {}, keys = { { "?", @@ -15,8 +11,9 @@ return { desc = "Buffer Local Keymaps (which-key)", }, }, - config = function() + config = function(_, opts) local wk = require("which-key") + wk.setup(opts) wk.add({ { "d", group = "Debug" }, { "f", group = "Telescope" }, -- cgit 1.3.1