From 3e5e1ee3063fde0f754f3e92e4094811bb5046a8 Mon Sep 17 00:00:00 2001 From: LordMZTE Date: Sat, 24 Apr 2021 19:41:58 +0200 Subject: [PATCH] add coc config --- nvim/lua/pluginconf/coc.lua | 12 ++++++++++++ nvim/lua/plugins.lua | 18 +++++++++++------- 2 files changed, 23 insertions(+), 7 deletions(-) create mode 100644 nvim/lua/pluginconf/coc.lua diff --git a/nvim/lua/pluginconf/coc.lua b/nvim/lua/pluginconf/coc.lua new file mode 100644 index 0000000..d9cc80c --- /dev/null +++ b/nvim/lua/pluginconf/coc.lua @@ -0,0 +1,12 @@ +vim.g.coc_global_extensions = { + "coc-snippets", + "coc-lua", + "coc-toml", + "coc-rust-analyzer", + "coc-json", + "coc-java", + "coc-haxe", + "coc-go", + "coc-fish", + "coc-clangd" +} diff --git a/nvim/lua/plugins.lua b/nvim/lua/plugins.lua index 2ef60e9..39c3464 100644 --- a/nvim/lua/plugins.lua +++ b/nvim/lua/plugins.lua @@ -1,9 +1,17 @@ vim.cmd [[packadd packer.nvim]] +local function pconf(plugin) + return "require(\"pluginconf." .. plugin .. "\")" +end + return require("packer").startup(function(use) use "wbthomason/packer.nvim" - use {"neoclide/coc.nvim", branch = "release"} + use { + "neoclide/coc.nvim", + branch = "release", + config = pconf("coc") + } use "scrooloose/nerdtree" use "Xuyuanp/nerdtree-git-plugin" use "tiagofumo/vim-nerdtree-syntax-highlight" @@ -17,9 +25,7 @@ return require("packer").startup(function(use) use { "glacambre/firenvim", run = function() vim.fn["firenvim#install"](0) end, - config = function() - require("pluginconf.firenvim") - end + config = pconf("firenvim") } use "jreybert/vimagit" use "airblade/vim-gitgutter" @@ -30,9 +36,7 @@ return require("packer").startup(function(use) use { "glepnir/galaxyline.nvim", branch = "main", - config = function() - require("pluginconf.galaxyline") - end + config = pconf("galaxyline") } end)