From 7a7a8ace1dacfff121ce90110c7b5c8635d178c3 Mon Sep 17 00:00:00 2001 From: filip <“filip.rabiega@gmail.com”> Date: Wed, 4 Feb 2026 16:34:45 +0100 Subject: plugin dump --- ale.lua | 34 ++++++++++++++++++++++++++++++++++ anki.lua | 19 +++++++++++++++++++ autopairs.lua | 42 ++++++++++++++++++++++++++++++++++++++++++ comment.lua | 14 ++++++++++++++ conform.lua | 23 +++++++++++++++++++++++ firenvim.lua | 3 +++ lspconfig.lua | 28 ++++++++++++++++++++++++++++ luasnip.lua | 10 ++++++++++ mason.lua | 22 ++++++++++++++++++++++ r.lua | 17 +++++++++++++++++ sqlua.lua | 10 ++++++++++ surround.lua | 12 ++++++++++++ telescope.lua | 37 +++++++++++++++++++++++++++++++++++++ tex.lua | 22 ++++++++++++++++++++++ undotree.lua | 7 +++++++ which-key.lua | 18 ++++++++++++++++++ 16 files changed, 318 insertions(+) create mode 100644 ale.lua create mode 100644 anki.lua create mode 100644 autopairs.lua create mode 100644 comment.lua create mode 100644 conform.lua create mode 100644 firenvim.lua create mode 100644 lspconfig.lua create mode 100644 luasnip.lua create mode 100644 mason.lua create mode 100644 r.lua create mode 100644 sqlua.lua create mode 100644 surround.lua create mode 100644 telescope.lua create mode 100644 tex.lua create mode 100644 undotree.lua create mode 100644 which-key.lua diff --git a/ale.lua b/ale.lua new file mode 100644 index 0000000..fc6b54e --- /dev/null +++ b/ale.lua @@ -0,0 +1,34 @@ +return { + { + "dense-analysis/ale", + ft = { "*" }, -- load for all filetypes + config = function() + -- Enable ALE linting + vim.g.ale_enabled = 1 + vim.g.ale_lint_on_text_changed = "always" + vim.g.ale_lint_on_insert_leave = 1 + vim.g.ale_sign_error = "✗" + vim.g.ale_sign_warning = "⚠" + vim.g.ale_sign_info = "ℹ" + + -- Fixers + vim.g.ale_fixers = { + python = { "black", "isort" }, + r = { "styler" }, + lua = { "stylua" }, + tex = { "latexindent" }, + } + + -- Automatically fix files on save + vim.g.ale_fix_on_save = 1 + + -- Optional: choose linters per language + vim.g.ale_linters = { + python = { "flake8", "mypy" }, + r = { "lintr" }, + lua = { "luacheck" }, + tex = { "chktex" }, + } + end, + }, +} diff --git a/anki.lua b/anki.lua new file mode 100644 index 0000000..30271e0 --- /dev/null +++ b/anki.lua @@ -0,0 +1,19 @@ +return { + { + "rareitems/anki.nvim", + -- lazy -- don't lazy it, it tries to be as lazy possible and it needs to add a filetype association + opts = { + { + -- this function will add support for associating '.anki' extension with both 'anki' and 'tex' filetype. + tex_support = true, + -- if 'true' it will move the cursor the position of the first field + move_cursor_after_creation = true, + models = { + -- Here you specify which notetype should be associated with which deck + ["Statystyka"] = "Statystyka", + ["Pleco"] = "English", + }, + }, + }, + }, +} diff --git a/autopairs.lua b/autopairs.lua new file mode 100644 index 0000000..97407dc --- /dev/null +++ b/autopairs.lua @@ -0,0 +1,42 @@ +return { + -- nvim-autopairs: auto close brackets, quotes + { + "windwp/nvim-autopairs", + event = "InsertEnter", -- lazy-load when entering insert mode + config = function() + require("nvim-autopairs").setup({}) + end, + }, + + -- nvim-cmp: autocompletion engine + -- { + -- "hrsh7th/nvim-cmp", + -- event = "InsertEnter", + -- dependencies = { + -- "hrsh7th/cmp-nvim-lsp", + -- "hrsh7th/cmp-buffer", + -- "hrsh7th/cmp-path", + -- "saadparwaiz1/cmp_luasnip", + -- "L3MON4D3/LuaSnip", + -- }, + -- config = function() + -- local cmp = require("cmp") + -- local luasnip = require("luasnip") + -- cmp.setup({ + -- snippet = { expand = function(args) luasnip.lsp_expand(args.body) end }, + -- mapping = cmp.mapping.preset.insert({ + -- [""] = cmp.mapping.select_next_item(), + -- [""] = cmp.mapping.select_prev_item(), + -- [""] = cmp.mapping.confirm({ select = true }), + -- [""] = cmp.mapping.complete(), + -- }), + -- sources = cmp.config.sources({ + -- { name = "nvim_lsp" }, + -- { name = "buffer" }, + -- { name = "path" }, + -- { name = "luasnip" }, + -- }), + -- }) + -- end, + -- }, +} diff --git a/comment.lua b/comment.lua new file mode 100644 index 0000000..a2331a4 --- /dev/null +++ b/comment.lua @@ -0,0 +1,14 @@ +return { + { + "numToStr/Comment.nvim", + keys = { "gc", "gb" }, -- lazy-load when using these mappings + config = function() + require("Comment").setup({ + -- your configuration here + padding = true, -- space between comment and line + sticky = true, -- keeps comment on empty lines + ignore = nil, -- lines to ignore + }) + end, + }, +} diff --git a/conform.lua b/conform.lua new file mode 100644 index 0000000..82e76b8 --- /dev/null +++ b/conform.lua @@ -0,0 +1,23 @@ +return { + "stevearc/conform.nvim", + -- event = { "BufReadPre", "BufNewFile" }, -- Load when you open a file + config = function() + local conform = require("conform") + + conform.setup({ + formatters_by_ft = { + -- Assign formatters to specific filetypes + python = { "isort", "black" }, + tex = { "tex-fmt" }, + lua = { "stylua" }, + sh = { "shfmt" }, + }, + -- This is the "Magic" part: Format on Save + format_on_save = { + lsp_fallback = true, -- Use LSP if no dedicated formatter is found + async = false, -- Formatting must be synchronous to save correctly + timeout_ms = 1000, -- Don't hang the UI for more than 0.5s + }, + }) + end, +} diff --git a/firenvim.lua b/firenvim.lua new file mode 100644 index 0000000..90d2d1d --- /dev/null +++ b/firenvim.lua @@ -0,0 +1,3 @@ +return { + { "glacambre/firenvim", build = ":call firenvim#install(0)" }, +} diff --git a/lspconfig.lua b/lspconfig.lua new file mode 100644 index 0000000..1184af8 --- /dev/null +++ b/lspconfig.lua @@ -0,0 +1,28 @@ +return { + "neovim/nvim-lspconfig", + dependencies = { "williamboman/mason.nvim" }, + config = function() + -- Define the configuration for pyright using the native API + vim.lsp.config("pyright", { + cmd = { "pyright-langserver", "--stdio" }, + filetypes = { "python" }, + root_markers = { "pyproject.toml", "setup.py", "requirements.txt", ".git" }, + settings = { + python = { + analysis = { + autoSearchPaths = true, + typeCheckingMode = "basic", + }, + }, + }, + }) + + -- Trigger the server start for python files + vim.api.nvim_create_autocmd("FileType", { + pattern = "python", + callback = function(args) + vim.lsp.start("pyright") + end, + }) + end, +} diff --git a/luasnip.lua b/luasnip.lua new file mode 100644 index 0000000..b4ff5fa --- /dev/null +++ b/luasnip.lua @@ -0,0 +1,10 @@ +return { + { + "L3MON4D3/LuaSnip", + -- follow latest release. + version = "v2.*", -- Replace by the latest released major (first number of latest release) + -- install jsregexp (optional!). + build = "make install_jsregexp", + dependencies = { "fiadra/chadsnips" }, + }, +} diff --git a/mason.lua b/mason.lua new file mode 100644 index 0000000..2f8e561 --- /dev/null +++ b/mason.lua @@ -0,0 +1,22 @@ +return { + "williamboman/mason.nvim", + dependencies = { + "williamboman/mason-lspconfig.nvim", + }, + config = function() + require("mason").setup({ + ensure_installed = { + "black", + "isort", + "stylua", + "tex-fmt", + "shfmt", + }, + }) + require("mason-lspconfig").setup({ + ensure_installed = { + "pyright", + }, + }) + end, +} diff --git a/r.lua b/r.lua new file mode 100644 index 0000000..496985f --- /dev/null +++ b/r.lua @@ -0,0 +1,17 @@ +return { + { + "jalvesaq/Nvim-R", + ft = { "r", "rmd", "R" }, + config = function() + vim.g.R_app = "radian" -- use radian for a better REPL + vim.g.R_cmd = "R" -- R command + vim.g.R_hl_term = 0 -- no syntax highlight in terminal + vim.g.R_bracketed_paste = 1 -- safer pasting + vim.g.R_assign = 2 -- `<-` on tab completion + + -- Optional: auto-send R Markdown to R + -- Use \rf in normal mode to render current file + vim.api.nvim_set_keymap("n", "", "\\rf", { noremap = true, silent = true }) + end, + }, +} diff --git a/sqlua.lua b/sqlua.lua new file mode 100644 index 0000000..ff26ec2 --- /dev/null +++ b/sqlua.lua @@ -0,0 +1,10 @@ +return { + { + "xemptuous/sqlua.nvim", + lazy = true, + cmd = "SQLua", + config = function() + require("sqlua").setup() + end, + }, +} diff --git a/surround.lua b/surround.lua new file mode 100644 index 0000000..0b5abe6 --- /dev/null +++ b/surround.lua @@ -0,0 +1,12 @@ +return { + { + "kylechui/nvim-surround", + version = "^3.0.0", -- Use for stability; omit to use `main` branch for the latest features + event = "VeryLazy", + config = function() + require("nvim-surround").setup({ + -- Configuration here, or leave empty to use defaults + }) + end, + }, +} diff --git a/telescope.lua b/telescope.lua new file mode 100644 index 0000000..f652ff2 --- /dev/null +++ b/telescope.lua @@ -0,0 +1,37 @@ +return { + { "nvim-tree/nvim-web-devicons", opts = {} }, + + { + "nvim-treesitter/nvim-treesitter", + lazy = false, + build = ":TSUpdate", + }, + + { + "nvim-telescope/telescope.nvim", + branch = "0.1.x", + dependencies = { "nvim-lua/plenary.nvim" }, + config = function() + local telescope = require("telescope") + telescope.setup({ + defaults = { + file_ignore_patterns = { "node_modules", ".git/" }, + }, + }) + + -- Optional keymaps + local map = vim.keymap.set + local opts = { noremap = true, silent = true } + + map("n", "fb", "Telescope buffers", opts) + map("n", "fc", "Telescope commands", opts) + map("n", "ff", "Telescope find_files", opts) + map("n", "fg", "Telescope live_grep", opts) + map("n", "fh", "Telescope help_tags", opts) + map("n", "fm", "Telescope marks", opts) + map("n", "fr", "Telescope registers", opts) + map("n", "fo", "Telescope oldfiles", opts) + map("n", "fv", "Telescope vim_options", opts) + end, + }, +} diff --git a/tex.lua b/tex.lua new file mode 100644 index 0000000..aad70e3 --- /dev/null +++ b/tex.lua @@ -0,0 +1,22 @@ +return { + { + "lervag/vimtex", + ft = { "tex", "bib", "latex" }, -- lazy-load on LaTeX files + config = function() + -- General vimtex settings + vim.g.vimtex_view_method = "zathura" -- PDF viewer + vim.g.vimtex_compiler_method = "latexmk" -- compiler + vim.g.vimtex_quickfix_mode = 0 -- disable quickfix + vim.g.vimtex_compiler_latexmk = { + options = { + "-pdf", + "-interaction=nonstopmode", + "-synctex=1", + }, + } + + -- Optional: F5 for compiling + vim.api.nvim_set_keymap("n", "", ":VimtexCompile", { noremap = true, silent = true }) + end, + }, +} diff --git a/undotree.lua b/undotree.lua new file mode 100644 index 0000000..3ba31fc --- /dev/null +++ b/undotree.lua @@ -0,0 +1,7 @@ +return { + -- undotree: visualize undo history + { + "mbbill/undotree", + cmd = "UndotreeToggle", -- lazy-load only when opening + }, +} diff --git a/which-key.lua b/which-key.lua new file mode 100644 index 0000000..cc9e55a --- /dev/null +++ b/which-key.lua @@ -0,0 +1,18 @@ +return { + -- Web icons + { + "nvim-tree/nvim-web-devicons", + }, + + -- which-key.nvim: shows available keybindings + { + "folke/which-key.nvim", + event = "VeryLazy", + config = function() + require("which-key").setup({ + plugins = { spelling = true }, + win = { border = "rounded" }, + }) + end, + }, +} -- cgit v1.2.3