Add COQ for auto-completion
This commit is contained in:
parent
b25bd71619
commit
706b5be1fd
3
init.lua
3
init.lua
@ -27,3 +27,6 @@ vim.api.nvim_set_keymap('n', '<C-p>', ":bp<cr>", {})
|
|||||||
-- Load plugins
|
-- Load plugins
|
||||||
require('plugins')
|
require('plugins')
|
||||||
|
|
||||||
|
-- Launch COQ after nvim finished starting
|
||||||
|
vim.api.nvim_create_autocmd({'VimEnter'}, {command = 'COQnow -s'})
|
||||||
|
|
||||||
|
|||||||
@ -1,14 +1,25 @@
|
|||||||
local function manage_plugins()
|
local function manage_plugins()
|
||||||
|
|
||||||
local plugins = {
|
local plugins = {
|
||||||
["https://github.com/faerryn/plogins.nvim.git"] = {},
|
["https://github.com/faerryn/plogins.nvim.git"] = {},
|
||||||
["https://github.com/tpope/vim-sensible"] = {},
|
["https://github.com/tpope/vim-sensible.git"] = {},
|
||||||
["https://github.com/neovim/nvim-lspconfig"] = {},
|
["https://github.com/neovim/nvim-lspconfig.git"] = {},
|
||||||
["https://github.com/simrat39/rust-tools.nvim"] = {
|
|
||||||
packadd_after = { ["https://github.com/neovim/nvim-lspconfig"] = true },
|
-- 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()
|
packadd_hook = function()
|
||||||
local rt = require("rust-tools")
|
local rt = require("rust-tools")
|
||||||
|
local coq = require("coq")
|
||||||
|
|
||||||
rt.setup({
|
rt.setup(coq.lsp_ensure_capabilities({
|
||||||
server = {
|
server = {
|
||||||
on_attach = function(_, bufnr)
|
on_attach = function(_, bufnr)
|
||||||
-- Hover actions
|
-- Hover actions
|
||||||
@ -19,7 +30,7 @@ local function manage_plugins()
|
|||||||
rt.code_action_group.code_action_group, { buffer = bufnr })
|
rt.code_action_group.code_action_group, { buffer = bufnr })
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
})
|
}))
|
||||||
end
|
end
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@ -34,8 +45,7 @@ end
|
|||||||
|
|
||||||
local plogins_source = "https://github.com/faerryn/plogins.nvim.git"
|
local plogins_source = "https://github.com/faerryn/plogins.nvim.git"
|
||||||
local plogins_name = plogins_source:gsub("/", "%%")
|
local plogins_name = plogins_source:gsub("/", "%%")
|
||||||
local plogins_dir =
|
local plogins_dir = ("%s/site/pack/plogins/opt/%s"):format((vim.fn.stdpath("data")),
|
||||||
("%s/site/pack/plogins/opt/%s"):format((vim.fn.stdpath("data")),
|
|
||||||
plogins_name)
|
plogins_name)
|
||||||
|
|
||||||
if not vim.loop.fs_stat(plogins_dir) then
|
if not vim.loop.fs_stat(plogins_dir) then
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user