diff --git a/init.lua b/init.lua index 238b52e..52d1e01 100644 --- a/init.lua +++ b/init.lua @@ -27,3 +27,6 @@ vim.api.nvim_set_keymap('n', '', ":bp", {}) -- Load plugins require('plugins') +-- Launch COQ after nvim finished starting +vim.api.nvim_create_autocmd({'VimEnter'}, {command = 'COQnow -s'}) + diff --git a/lua/plugins.lua b/lua/plugins.lua index c428371..e07ce1f 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -1,14 +1,25 @@ local function manage_plugins() + local plugins = { ["https://github.com/faerryn/plogins.nvim.git"] = {}, - ["https://github.com/tpope/vim-sensible"] = {}, - ["https://github.com/neovim/nvim-lspconfig"] = {}, - ["https://github.com/simrat39/rust-tools.nvim"] = { - packadd_after = { ["https://github.com/neovim/nvim-lspconfig"] = true }, + ["https://github.com/tpope/vim-sensible.git"] = {}, + ["https://github.com/neovim/nvim-lspconfig.git"] = {}, + + -- COQ + ["https://github.com/ms-jpq/coq_nvim.git"] = {}, + ["https://github.com/ms-jpq/coq.artifacts.git"] = { + packadd_after = { ["https://github.com/ms-jpq/coq_nvim.git"] = true } + }, + + -- LSP servers + ["https://github.com/simrat39/rust-tools.nvim.git"] = { + packadd_after = { ["https://github.com/neovim/nvim-lspconfig"] = true, + ["https://github.com/ms-jpq/coq_nvim"] = true}, packadd_hook = function() local rt = require("rust-tools") + local coq = require("coq") - rt.setup({ + rt.setup(coq.lsp_ensure_capabilities({ server = { on_attach = function(_, bufnr) -- Hover actions @@ -19,7 +30,7 @@ local function manage_plugins() rt.code_action_group.code_action_group, { buffer = bufnr }) end, }, - }) + })) end }, } @@ -34,8 +45,7 @@ end local plogins_source = "https://github.com/faerryn/plogins.nvim.git" local plogins_name = plogins_source:gsub("/", "%%") -local plogins_dir = -("%s/site/pack/plogins/opt/%s"):format((vim.fn.stdpath("data")), +local plogins_dir = ("%s/site/pack/plogins/opt/%s"):format((vim.fn.stdpath("data")), plogins_name) if not vim.loop.fs_stat(plogins_dir) then