nvim-config

Log | Files | Refs | Submodules | README

plugins.lua (3212B)


      1 -- vim: et
      2 
      3 -- Clone 'mini.nvim' manually in a way that it gets managed by 'mini.deps'
      4 local path_package = vim.fn.stdpath('data') .. '/site/'
      5 local mini_path = path_package .. 'pack/deps/start/mini.nvim'
      6 if not vim.loop.fs_stat(mini_path) then
      7   vim.cmd('echo "Installing `mini.nvim`" | redraw')
      8   local clone_cmd = {
      9     'git', 'clone', '--filter=blob:none',
     10     'https://github.com/echasnovski/mini.nvim', mini_path
     11   }
     12   vim.fn.system(clone_cmd)
     13   vim.cmd('packadd mini.nvim | helptags ALL')
     14   vim.cmd('echo "Installed `mini.nvim`" | redraw')
     15 end
     16 
     17 -- Set up 'mini.deps' (customize to your liking)
     18 require('mini.deps').setup {
     19   path = { package = path_package },
     20   job = {
     21     n_threads = 4,
     22   }
     23 }
     24 
     25 local add = MiniDeps.add
     26 
     27 require 'mini.comment'.setup()
     28 require 'mini.pairs'.setup {
     29   modes = { insert = true }
     30 }
     31 require 'mini.colors'.setup()
     32 require 'mini.surround'.setup {
     33   mappings = {
     34     add = 'sa',
     35     delete = 'sd',
     36     find = 'sf',
     37     find_left = 'sF',
     38     highlight = 'sh',
     39     replace = 'sr',
     40     update_n_lines = '',
     41   },
     42 }
     43 
     44 local hipatterns = require('mini.hipatterns')
     45 hipatterns.setup({
     46   highlighters = {
     47     -- Highlight standalone 'FIXME', 'HACK', 'TODO', 'NOTE'
     48     fixme     = { pattern = '%f[%w]()FIXME()%f[%W]', group = 'MiniHipatternsFixme' },
     49     hack      = { pattern = '%f[%w]()HACK()%f[%W]', group = 'MiniHipatternsHack' },
     50     todo      = { pattern = '%f[%w]()TODO()%f[%W]', group = 'MiniHipatternsTodo' },
     51     note      = { pattern = '%f[%w]()NOTE()%f[%W]', group = 'MiniHipatternsNote' },
     52 
     53     -- Highlight hex color strings (`#rrggbb`) using that color
     54     hex_color = hipatterns.gen_highlighter.hex_color(),
     55   },
     56 })
     57 
     58 require('mini.ai').setup {}
     59 
     60 add 'maxmx03/dracula.nvim'
     61 vim.cmd.colorscheme "dracula"
     62 
     63 add {
     64   source = "nvim-treesitter/nvim-treesitter",
     65   hooks = {
     66     post_checkout = function()
     67       vim.cmd "TSUpdate"
     68     end
     69   }
     70 }
     71 
     72 require 'nvim-treesitter.configs'.setup {
     73   highlight = {
     74     enable = true,
     75     disable = {},
     76   },
     77   ensure_installed = { 'c', 'lua', 'query', 'fennel', 'python', 'vim', 'bash', 'latex' }
     78 }
     79 
     80 -- LSP stuff
     81 add "williamboman/mason.nvim"
     82 require "mason".setup {}
     83 
     84 add "vigoux/ltex-ls.nvim"
     85 
     86 -- My stuff
     87 add { source = "ssh://git@git.sr.ht/~vigoux/complementree.nvim" }
     88 add { source = "ssh://git@git.sr.ht/~vigoux/architext.nvim" }
     89 
     90 local function run_cmd(cmd)
     91   return function(data)
     92     local finished = false
     93     vim.system(cmd, {
     94       cwd = data.path
     95     }, function()
     96       finished = true
     97     end)
     98     vim.wait(10000, function()
     99       return finished
    100     end)
    101   end
    102 end
    103 
    104 local azy_build_lib = run_cmd { "make", "lib" }
    105 
    106 add {
    107   source = 'ssh://git@git.sr.ht/~vigoux/azy.nvim',
    108   hooks = {
    109     post_checkout = azy_build_lib,
    110     post_install = azy_build_lib,
    111   }
    112 }
    113 require 'azy_config'
    114 
    115 add 'vigoux/notifier.nvim'
    116 require 'notifier'.setup {
    117   component_name_recall = true,
    118 }
    119 
    120 add 'mfussenegger/nvim-qwahl'
    121 add 'lewis6991/gitsigns.nvim'
    122 
    123 add 'nvim-orgmode/orgmode'
    124 require('orgmode').setup {
    125   org_agenda_files = '~/orgfiles/**/*',
    126   org_default_notes_file = '~/orgfiles/refile.org',
    127   org_todo_keywords = { 'TODO', 'DOING', '|', 'DONE' },
    128   mappings = {
    129     global = {
    130       org_agenda = "gA",
    131       org_capture = "gC"
    132     }
    133   }
    134 }