--[[-- File : conf.d/lvim/lua/user/plugins.lua Author : Jeff Lance Date : 28.12.2023 21:31:06 Last Modified Date: 28.12.2023 21:31:06 Last Modified By : Jeff Lance --]]-- local M = {} M.setup = function() local configs = require("user.plugin-configs") lvim.plugins = { -- abolish { 'tpope/vim-abolish', }, -- addheader { 'alpertuna/vim-header', config = function() vim.cmd([[ let g:header_field_author = 'Jeff Lance' let g:header_field_author_email = 'email@jefflance.me' let g:header_auto_update_header = 1 let g:header_field_filename_path = 1 let g:header_field_timestamp_format = '%d.%m.%Y %H:%M:%S' ]]) end, }, -- new file plugin { 'Mohammed-Taher/AdvancedNewFile.nvim', }, -- asyncrun { "skywind3000/asyncrun.vim", }, -- chatgpt { "jackMort/ChatGPT.nvim", event = "VeryLazy", config = function() require("chatgpt").setup({ api_key_cmd = "pass _api_keys/openai_perso-1" }) end, dependencies = { "MunifTanjim/nui.nvim", "nvim-lua/plenary.nvim", "nvim-telescope/telescope.nvim" } }, -- cmp addons { "tzachar/cmp-tabnine", build = "./install.sh", dependencies = "hrsh7th/nvim-cmp", event = "InsertEnter", }, { "micangl/cmp-vimtex", dependencies = "hrsh7th/nvim-cmp", }, -- colorschemes { 'Abstract-IDE/Abstract-cs', }, { 'ishan9299/modus-theme-vim', }, { 'NLKNguyen/papercolor-theme', }, { 'olimorris/onedarkpro.nvim', priority = 1000, config = function() require("onedarkpro").setup({ colors = { onedark = { bg = "#000000" -- black }, onelight = { bg = "#FFFFFF" -- white }, -- cursorline = "#FF0000", }, styles = { types = "NONE", methods = "NONE", numbers = "NONE", strings = "NONE", comments = "italic", keywords = "bold,italic", constants = "NONE", functions = "italic", operators = "NONE", variables = "NONE", parameters = "NONE", conditionals = "italic", virtual_text = "NONE", }, options = { cursorline = true, transparency = true, } }) end }, -- floaterm { 'voldikss/vim-floaterm', }, -- gitignore { 'jefflance/vim-gitignore', }, -- languagetool { 'dpelle/vim-grammalecte', config = function () vim.cmd([[ let g:grammalecte_cli_py = '/usr/bin/grammalecte-cli' ]]) end }, -- markdown: syntax highlighting, matching rules and mappings for -- the original Markdown and extensions { 'preservim/vim-markdown', ft = "markdown", config = function() vim.g.vim_markdown_folding_disabled = 1 vim.g.vim_markdown_no_default_key_mappings = 0 vim.g.vim_markdown_conceal_code_blocks = 0 vim.g.vim_markdown_math = 1 vim.g.tex_conceal = "abmgs" vim.g.vim_markdown_conceal = 1 vim.g.vim_markdown_toc_autofit = 1 vim.g.vim_markdown_follow_anchor = 0 vim.g.vim_markdown_toml_frontmatter = 1 vim.g.vim_markdown_strikethrough = 1 end, }, -- markdown previewer { 'iamcco/markdown-preview.nvim', build = "cd app && npx --yes yarn install", ft = "markdown", config = function() vim.cmd([[ let g:mkdp_auto_start = 1 ]]) end, }, -- markdown to pdf conversion { 'arminveres/md-pdf.nvim', branch = 'main', lazy = true, config = function() local mdpdf = require('md-pdf') mdpdf.setup({ margins = "0.8cm", highlight = "tango", toc = false, preview_cmd = function() return 'zathura' end }) end, }, -- mason { 'WhoIsSethDaniel/mason-tool-installer.nvim', config = function() local mason = require('mason-tool-installer') mason.setup({ ensure_installed = { 'ocaml-lsp', 'ocamlformat', 'xo', 'textlint', 'yamllint', 'yq', 'ansible-lint', 'xmlformatter', 'typescript-language-server', 'tailwindcss-language-server', 'texlab', 'pyright', 'golines', 'prettier', 'lua-language-server', 'markdownlint', 'black', 'bash-language-server', 'golangci-lint', 'go-debug-adapter', 'editorconfig-checker', 'autopep8', 'beautysh', 'clangd', 'djlint', 'docker-compose-language-service', 'dockerfile-language-server', 'dot-language-server', 'golangci-lint-langserver', 'gopls', 'html-lsp', 'intelephense', 'jq', 'json-lsp', 'jsonlint', 'latexindent', 'lemminx', 'markdown-toc', 'marksman', 'perlnavigator', 'php-debug-adapter', 'twigcs', 'vim-language-server', 'yaml-language-server', 'yamlfix', }, auto_update = true, run_on_start = true, start_delay = 15000, debounce_hours = 24, }) end }, -- minimap { 'echasnovski/mini.map', branch = "stable", config = function() require('mini.map').setup() local map = require('mini.map') map.setup({ integrations = { map.gen_integration.builtin_search(), map.gen_integration.diagnostic({ error = 'DiagnosticFloatingError', warn = 'DiagnosticFloatingWarn', info = 'DiagnosticFloatingInfo', hint = 'DiagnosticFloatingHint', }), }, symbols = { encode = map.gen_encode_symbols.dot('2x1'), }, window = { side = 'right', width = 20, -- set to 1 for a pure scrollbar :) winblend = 15, show_integration_count = false, }, }) end }, -- neoscroll: smooth scrolling { "karb94/neoscroll.nvim", event = "WinScrolled", config = function() require('neoscroll').setup({ -- All these keys will be mapped to their corresponding default scrolling animation mappings = { '', '', '', '', '', '', 'zt', 'zz', 'zb' }, hide_cursor = true, -- Hide cursor while scrolling stop_eof = true, -- Stop at when scrolling downwards use_local_scrolloff = false, -- Use the local scope of scrolloff instead of the global scope respect_scrolloff = false, -- Stop scrolling when the cursor reaches the scrolloff margin of the file cursor_scrolls_alone = true, -- The cursor will keep on scrolling even if the window cannot scroll further easing_function = nil, -- Default easing function pre_hook = nil, -- Function to run before the scrolling animation starts post_hook = nil, -- Function to run after the scrolling animation ends }) end }, { "postfen/clipboard-image.nvim", keys = { { "i", "PasteImg"}, }, config = function() require'clipboard-image'.setup({ -- Default configuration for all filetype default = { img_dir = {"%:p:h", "img"}, -- Use table for nested dir (New feature form PR #20) img_name = function () vim.fn.inputsave() local name = vim.fn.input('Name: ') vim.fn.inputrestore() return name end, affix = "<\n %s\n>" -- Multi lines affix }, markdown = { img_dir = {"%:p:h", "img"}, -- Use table for nested dir (New feature form PR #20) img_name = function () vim.fn.inputsave() local name = vim.fn.input('Name: ') vim.fn.inputrestore() return name end, img_handler = function(img) vim.cmd("normal! f[") -- go to [ vim.cmd("normal! a" .. img.name) -- append text with image name end, affix = "![](%s)", } }) end }, -- lists: plugin to manage text based lists { 'bullets-vim/bullets.vim', }, { 'lervag/lists.vim', ft = "markdown", config = function() vim.cmd("ListsEnable") end }, { 'lervag/vim-rainbow-lists', }, { 'KabbAmine/lazyList.vim', }, -- nvim-ts-rainbow: rainbowed parenthesis { "HiPhish/nvim-ts-rainbow2", }, -- colorizer: color highlighter { 'norcalli/nvim-colorizer.lua', config = function() require("colorizer").setup({ '*' }, { RGB = true, -- #RGB hex codes RRGGBB = true, -- #RRGGBB hex codes RRGGBBAA = true, -- #RRGGBBAA hex codes rgb_fn = true, -- CSS rgb() and rgba() functions hsl_fn = true, -- CSS hsl() and hsla() functions css = true, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB css_fn = true, -- Enable all CSS *functions*: rgb_fn, hsl_fn mode = 'background', }) end, }, -- rnvimr { "kevinhwang91/rnvimr", cmd = "RnvimrToggle", config = function() vim.cmd([[ let g:rnvimr_enable_ex = 1 let g:rnvimr_enable_picker = 1 let g:rnvimr_edit_cmd = 'drop' let g:rnvimr_draw_border = 1 let g:rnvimr_hide_gitignore = 1 " let g:rnvimr_border_attr = {'fg': 14, 'bg': 0} let g:rnvimr_enable_bw = 1 " let g:rnvimr_shadow_winblend = 70 let g:rnvimr_ranger_cmd = ['ranger', '--cmd=set draw_borders both'] ]]) end, }, -- suda { 'lambdalisue/suda.vim', config = function() vim.cmd([[ let g:prompt = 'Mot de passe: ' let g:suda_smart_edit = 1 ]]) end, }, -- trouble { 'folke/trouble.nvim', cmd = "TroubleToggle", }, -- vim-repeat: enable repeating supported plugin maps with "." { "tpope/vim-repeat" }, -- vim-surround { 'tpope/vim-surround', config = function() vim.cmd([[ let timeoutlen = 500 ]]) end, }, -- LaTeX management needed plugins { "lervag/vimtex", config = function() vim.cmd([[ let g:vimtex_view_method = "zathura" let g:vimtex_quickfix_enabled = 0 let g:vimtex_compiler_method = 'latexmk' let g:vimtex_view_use_temp_files = 0 ]]) end, }, { "KeitaNakamura/tex-conceal.vim" }, -- Python management needed plugins { "ChristianChiarulli/swenv.nvim" }, { "stevearc/dressing.nvim" }, { "mfussenegger/nvim-dap-python" }, { "nvim-neotest/neotest" }, { 'nvim-neotest/nvim-nio' }, { "nvim-neotest/neotest-python" }, -- zk: a plain text note-taking assistant { 'mickael-menu/zk-nvim', config = function() require("zk").setup({ }) end, }, } end return M