From 1d5ca0aa2971d2485575ed7c5efad17144cb3fb1 Mon Sep 17 00:00:00 2001 From: pablu Date: Sun, 22 Mar 2026 18:04:35 +0100 Subject: Initial commit --- dot_config/nvim/lua/plugins/autoclose.lua | 6 +++ dot_config/nvim/lua/plugins/blink.lua | 31 +++++++++++ dot_config/nvim/lua/plugins/catppuccin.lua | 24 +++++++++ dot_config/nvim/lua/plugins/conform.lua | 22 ++++++++ dot_config/nvim/lua/plugins/dap.lua | 77 ++++++++++++++++++++++++++++ dot_config/nvim/lua/plugins/fidget.lua | 4 ++ dot_config/nvim/lua/plugins/flash.lua | 9 ++++ dot_config/nvim/lua/plugins/linter.lua | 17 ++++++ dot_config/nvim/lua/plugins/lsp.lua | 37 +++++++++++++ dot_config/nvim/lua/plugins/lualine.lua | 11 ++++ dot_config/nvim/lua/plugins/mason.lua | 4 ++ dot_config/nvim/lua/plugins/neotest.lua | 22 ++++++++ dot_config/nvim/lua/plugins/oil.lua | 10 ++++ dot_config/nvim/lua/plugins/telescope.lua | 33 ++++++++++++ dot_config/nvim/lua/plugins/tiny-inline.lua | 19 +++++++ dot_config/nvim/lua/plugins/tmux.lua | 15 ++++++ dot_config/nvim/lua/plugins/treesitter.lua | 25 +++++++++ dot_config/nvim/lua/plugins/vim-lazy-dev.lua | 11 ++++ dot_config/nvim/lua/plugins/which-key.lua | 27 ++++++++++ 19 files changed, 404 insertions(+) create mode 100644 dot_config/nvim/lua/plugins/autoclose.lua create mode 100644 dot_config/nvim/lua/plugins/blink.lua create mode 100644 dot_config/nvim/lua/plugins/catppuccin.lua create mode 100644 dot_config/nvim/lua/plugins/conform.lua create mode 100644 dot_config/nvim/lua/plugins/dap.lua create mode 100644 dot_config/nvim/lua/plugins/fidget.lua create mode 100644 dot_config/nvim/lua/plugins/flash.lua create mode 100644 dot_config/nvim/lua/plugins/linter.lua create mode 100644 dot_config/nvim/lua/plugins/lsp.lua create mode 100644 dot_config/nvim/lua/plugins/lualine.lua create mode 100644 dot_config/nvim/lua/plugins/mason.lua create mode 100644 dot_config/nvim/lua/plugins/neotest.lua create mode 100644 dot_config/nvim/lua/plugins/oil.lua create mode 100644 dot_config/nvim/lua/plugins/telescope.lua create mode 100644 dot_config/nvim/lua/plugins/tiny-inline.lua create mode 100644 dot_config/nvim/lua/plugins/tmux.lua create mode 100644 dot_config/nvim/lua/plugins/treesitter.lua create mode 100644 dot_config/nvim/lua/plugins/vim-lazy-dev.lua create mode 100644 dot_config/nvim/lua/plugins/which-key.lua (limited to 'dot_config/nvim/lua/plugins') diff --git a/dot_config/nvim/lua/plugins/autoclose.lua b/dot_config/nvim/lua/plugins/autoclose.lua new file mode 100644 index 0000000..cd9e6ce --- /dev/null +++ b/dot_config/nvim/lua/plugins/autoclose.lua @@ -0,0 +1,6 @@ +return { + 'm4xshen/autoclose.nvim', + config = function() + require('autoclose').setup() + end +} diff --git a/dot_config/nvim/lua/plugins/blink.lua b/dot_config/nvim/lua/plugins/blink.lua new file mode 100644 index 0000000..2c424bd --- /dev/null +++ b/dot_config/nvim/lua/plugins/blink.lua @@ -0,0 +1,31 @@ +return { + "saghen/blink.cmp", + dependecies = { "rafamadriz/friendly-snippets" }, + version = "1.*", + ---@module 'blink.cmp' + ---@type blink.cmp.Config + opts = { + keymap = { + preset = "enter", + [''] = { 'show_signature', 'hide_signature', 'fallback' }, + }, + appearance = { + nerd_font_variant = "mono" + }, + signature = { + enabled = true + }, + completion = { + menu = { + draw = { + padding = { 0, 1 }, -- padding only on right side + components = { + kind_icon = { + text = function(ctx) return ' ' .. ctx.kind_icon .. ctx.icon_gap .. ' ' end + } + } + } + } + } + } +} diff --git a/dot_config/nvim/lua/plugins/catppuccin.lua b/dot_config/nvim/lua/plugins/catppuccin.lua new file mode 100644 index 0000000..772b80e --- /dev/null +++ b/dot_config/nvim/lua/plugins/catppuccin.lua @@ -0,0 +1,24 @@ +return +{ + "catppuccin/nvim", + name = "catppuccin", + priority = 1000, + lazy = false, + config = function() + -- require("catppuccin").setup({ + -- transparent_background = true, + -- }) + + vim.cmd.colorscheme "catppuccin" + end +} +-- { +-- "nyoom-engineering/oxocarbon.nvim", +-- config = function() +-- vim.opt.background = "dark" +-- vim.cmd.colorscheme "oxocarbon" +-- +-- -- vim.api.nvim_set_hl(0, "Normal", { bg = "none" }) +-- -- vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" }) +-- end +-- } diff --git a/dot_config/nvim/lua/plugins/conform.lua b/dot_config/nvim/lua/plugins/conform.lua new file mode 100644 index 0000000..c10e6fa --- /dev/null +++ b/dot_config/nvim/lua/plugins/conform.lua @@ -0,0 +1,22 @@ +return { + "stevearc/conform.nvim", + config = function() + local conform = require("conform") + + conform.setup { + formatters_by_ft = { + lua = { "stylua" }, + python = { "isort", "black", lsp_format = "fallback" }, + gotmpl = { "djlint" } + }, + format_on_save = { + timeout_ms = 500, + lsp_format = "fallback" + } + } + + conform.formatters.djlint = { + append_args = { "--max-blank-lines", "5" } + } + end +} diff --git a/dot_config/nvim/lua/plugins/dap.lua b/dot_config/nvim/lua/plugins/dap.lua new file mode 100644 index 0000000..6d63dfa --- /dev/null +++ b/dot_config/nvim/lua/plugins/dap.lua @@ -0,0 +1,77 @@ +return { + "mfussenegger/nvim-dap", + event = "VeryLazy", + dependencies = { + "rcarriga/nvim-dap-ui", + "nvim-neotest/nvim-nio", + "jay-babu/mason-nvim-dap.nvim", + "theHamsta/nvim-dap-virtual-text", + }, + config = function() + local mason_dap = require("mason-nvim-dap") + local dap = require("dap") + local ui = require("dapui") + local dap_virtual_text = require("nvim-dap-virtual-text") + + -- Dap Virtual Text + dap_virtual_text.setup() + + mason_dap.setup({ + ensure_installed = { "python" }, + automatic_installation = true, + handlers = { + function(config) + require("mason-nvim-dap").default_setup(config) + end, + }, + }) + + -- 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", + + -- 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, + }, + }, + } + + -- Dap UI + + ui.setup() + + vim.fn.sign_define("DapBreakpoint", { text = "🐞" }) + + dap.listeners.before.attach.dapui_config = function() + ui.open() + end + dap.listeners.before.launch.dapui_config = function() + ui.open() + end + dap.listeners.before.event_terminated.dapui_config = function() + ui.close() + end + dap.listeners.before.event_exited.dapui_config = function() + ui.close() + end + end +} diff --git a/dot_config/nvim/lua/plugins/fidget.lua b/dot_config/nvim/lua/plugins/fidget.lua new file mode 100644 index 0000000..dc31181 --- /dev/null +++ b/dot_config/nvim/lua/plugins/fidget.lua @@ -0,0 +1,4 @@ +return { + "j-hui/fidget.nvim", + opts = {} +} diff --git a/dot_config/nvim/lua/plugins/flash.lua b/dot_config/nvim/lua/plugins/flash.lua new file mode 100644 index 0000000..61df6c2 --- /dev/null +++ b/dot_config/nvim/lua/plugins/flash.lua @@ -0,0 +1,9 @@ +return { + "folke/flash.nvim", + event = "VeryLazy", + ---@type Flash.Config + opts = {}, + keys = { + { "zk", mode = { "n", "x", "o" }, function() require("flash").jump() end, desc = "Flash" }, + }, +} diff --git a/dot_config/nvim/lua/plugins/linter.lua b/dot_config/nvim/lua/plugins/linter.lua new file mode 100644 index 0000000..1628ca6 --- /dev/null +++ b/dot_config/nvim/lua/plugins/linter.lua @@ -0,0 +1,17 @@ +return { + 'mfussenegger/nvim-lint', + config = function() + local lint = require("lint") + lint.linters_by_ft = { + python = { 'mypy' } + } + + local lint_augroup = vim.api.nvim_create_augroup("lint", { clear = true }) + vim.api.nvim_create_autocmd({ "BufEnter", "BufWritePost", "InsertLeave" }, { + group = lint_augroup, + callback = function() + lint.try_lint(nil, { ignore_errors = true }) + end, + }) + end +} diff --git a/dot_config/nvim/lua/plugins/lsp.lua b/dot_config/nvim/lua/plugins/lsp.lua new file mode 100644 index 0000000..2c5d398 --- /dev/null +++ b/dot_config/nvim/lua/plugins/lsp.lua @@ -0,0 +1,37 @@ +return { + "neovim/nvim-lspconfig", + config = function() + vim.lsp.enable({ "lua_ls", + "basedpyright", + "gopls", + "html", + "yamlls", + "svelte-language-server", + "clangd", + "ansiblels", + "vtsls", + "zls", + "glsl_analyzer", + "rust_analyzer", + "templ", + "tailwindcss", + }) + + + -- Testing basedpyright atm, change to jedi idk + vim.lsp.config("basedpyright", { + settings = { + ['basedpyright'] = { + analysis = { + typeCheckingMode = "basic", + inlayHints = { + variableTypes = true, + genericTypes = true, + }, + autoFormatStrings = true, + } + } + } + }) + end +} diff --git a/dot_config/nvim/lua/plugins/lualine.lua b/dot_config/nvim/lua/plugins/lualine.lua new file mode 100644 index 0000000..669b6cd --- /dev/null +++ b/dot_config/nvim/lua/plugins/lualine.lua @@ -0,0 +1,11 @@ +return { + 'nvim-lualine/lualine.nvim', + dependencies = { 'nvim-tree/nvim-web-devicons' }, + config = function() + require('lualine').setup({ + options = { + theme = 'dracula' + } + }) + end +} diff --git a/dot_config/nvim/lua/plugins/mason.lua b/dot_config/nvim/lua/plugins/mason.lua new file mode 100644 index 0000000..0d059b1 --- /dev/null +++ b/dot_config/nvim/lua/plugins/mason.lua @@ -0,0 +1,4 @@ +return { + "mason-org/mason.nvim", + opts = {} +} diff --git a/dot_config/nvim/lua/plugins/neotest.lua b/dot_config/nvim/lua/plugins/neotest.lua new file mode 100644 index 0000000..1f6efcf --- /dev/null +++ b/dot_config/nvim/lua/plugins/neotest.lua @@ -0,0 +1,22 @@ +return { + "nvim-neotest/neotest", + dependencies = { + "nvim-neotest/nvim-nio", + "nvim-neotest/neotest-python", + "nvim-neotest/neotest-go", + "nvim-lua/plenary.nvim", + "antoinemadec/FixCursorHold.nvim", + "nvim-treesitter/nvim-treesitter" + }, + config = function() + require("neotest").setup({ + adapters = { + require("neotest-python"), + require("neotest-go") + }, + diagnostic = { + enabled = true + } + }) + end +} diff --git a/dot_config/nvim/lua/plugins/oil.lua b/dot_config/nvim/lua/plugins/oil.lua new file mode 100644 index 0000000..8d4c7fc --- /dev/null +++ b/dot_config/nvim/lua/plugins/oil.lua @@ -0,0 +1,10 @@ +return { + 'stevearc/oil.nvim', + ---@module 'oil' + ---@type oil.SetupOpts + opts = {}, + -- Optional dependencies + dependencies = { { "nvim-mini/mini.icons", opts = {} } }, + -- Lazy loading is not recommended because it is very tricky to make it work correctly in all situations. + lazy = false, +} diff --git a/dot_config/nvim/lua/plugins/telescope.lua b/dot_config/nvim/lua/plugins/telescope.lua new file mode 100644 index 0000000..3f4989a --- /dev/null +++ b/dot_config/nvim/lua/plugins/telescope.lua @@ -0,0 +1,33 @@ +return { + { + 'nvim-telescope/telescope.nvim', + tag = '0.1.6', + dependencies = { + 'nvim-lua/plenary.nvim', + 'BurntSushi/ripgrep', + { 'nvim-telescope/telescope-fzf-native.nvim', build = 'make' } + }, + }, + { + 'nvim-telescope/telescope-ui-select.nvim', + config = function() + local telescope = require("telescope") + telescope.setup({ + pickers = { + find_files = { + find_command = { "rg", "--files", "--glob", "!**/vendor/*", "--glob", "!*_templ.go" } + }, + }, + extensions = { + ["ui-select"] = { + require("telescope.themes").get_dropdown { + } + } + } + }) + + telescope.load_extension("ui-select") + telescope.load_extension("fzf") + end + } +} diff --git a/dot_config/nvim/lua/plugins/tiny-inline.lua b/dot_config/nvim/lua/plugins/tiny-inline.lua new file mode 100644 index 0000000..440e829 --- /dev/null +++ b/dot_config/nvim/lua/plugins/tiny-inline.lua @@ -0,0 +1,19 @@ +return { + "rachartier/tiny-inline-diagnostic.nvim", + event = "VeryLazy", + priority = 1000, + config = function() + require('tiny-inline-diagnostic').setup({ + preset = "modern", + transparent_bg = true, + + options = { + multilines = { + enabled = true, + always_show = true, + } + } + }) + vim.diagnostic.config({ virtual_text = false }) -- Disable Neovim's default virtual text diagnostics + end, +} diff --git a/dot_config/nvim/lua/plugins/tmux.lua b/dot_config/nvim/lua/plugins/tmux.lua new file mode 100644 index 0000000..2b859f8 --- /dev/null +++ b/dot_config/nvim/lua/plugins/tmux.lua @@ -0,0 +1,15 @@ +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/treesitter.lua b/dot_config/nvim/lua/plugins/treesitter.lua new file mode 100644 index 0000000..cf947b9 --- /dev/null +++ b/dot_config/nvim/lua/plugins/treesitter.lua @@ -0,0 +1,25 @@ +return { + "nvim-treesitter/nvim-treesitter", + build = ":TSUpdate", + config = function() + require("nvim-treesitter.configs").setup({ + ensure_installed = { "lua", "go", "zig", "markdown", "json", "yaml", "javascript", + "typescript", "bash", "python", "c_sharp", "cpp", "gleam", "svelte" }, + indent = { enable = true }, + sync_install = false, + + highlight = { enable = true }, + }) + + local treesitter_parser_config = require("nvim-treesitter.parsers").get_parser_configs() + treesitter_parser_config.templ = { + install_info = { + url = "https://github.com/vrischmann/tree-sitter-templ.git", + files = { "src/parser.c", "src/scanner.c" }, + branch = "master", + }, + } + + vim.treesitter.language.register("templ", "templ") + end +} diff --git a/dot_config/nvim/lua/plugins/vim-lazy-dev.lua b/dot_config/nvim/lua/plugins/vim-lazy-dev.lua new file mode 100644 index 0000000..864161c --- /dev/null +++ b/dot_config/nvim/lua/plugins/vim-lazy-dev.lua @@ -0,0 +1,11 @@ +return { + "folke/lazydev.nvim", + ft = "lua", -- only load on lua files + opts = { + library = { + -- See the configuration section for more details + -- Load luvit types when the `vim.uv` word is found + { path = "${3rd}/luv/library", words = { "vim%.uv" } }, + }, + }, +} diff --git a/dot_config/nvim/lua/plugins/which-key.lua b/dot_config/nvim/lua/plugins/which-key.lua new file mode 100644 index 0000000..62125fe --- /dev/null +++ b/dot_config/nvim/lua/plugins/which-key.lua @@ -0,0 +1,27 @@ +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 + }, + keys = { + { + "?", + function() + require("which-key").show({ global = false }) + end, + desc = "Buffer Local Keymaps (which-key)", + }, + }, + config = function() + local wk = require("which-key") + wk.add({ + { "d", group = "Debug" }, + { "f", group = "Telescope" }, + { "t", group = "Test" }, + { "c", group = "Code" }, + }) + end +} -- cgit 1.3.1