From fa3815f28ce7eb934dcc9afe6a52ef5b7b663d0a Mon Sep 17 00:00:00 2001 From: Aljoscha Poertner Date: Mon, 17 Jun 2024 14:15:29 +0200 Subject: [PATCH] feat: add coq and configure lsp for it Signed-off-by: Aljoscha Poertner --- lua/config/lsp/lspconfig.lua | 29 ++++++++++++++++++++++++ lua/config/plugins.lua | 43 ++++++++++++++++++++++-------------- 2 files changed, 56 insertions(+), 16 deletions(-) diff --git a/lua/config/lsp/lspconfig.lua b/lua/config/lsp/lspconfig.lua index e69de29..f01ba5c 100644 --- a/lua/config/lsp/lspconfig.lua +++ b/lua/config/lsp/lspconfig.lua @@ -0,0 +1,29 @@ +local lspconfig = require('lspconfig') +local coq = require('coq') +lspconfig.rust_analyzer.setup { + settings = { + ['rust-analyzer'] = {}, + }, + coq.lsp_ensure_capabilities() +} +lspconfig.gopls.setup { + coq.lsp_ensure_capabilities() +} +lspconfig.yamlls.setup { + coq.lsp_ensure_capabilities() +} +lspconfig.marksman.setup { + coq.lsp_ensure_capabilities() +} +lspconfig.helm_ls.setup { + coq.lsp_ensure_capabilities() +} +lspconfig.gitlab_ci_ls.setup { + coq.lsp_ensure_capabilities() +} +lspconfig.jinja_lsp.setup { + coq.lsp_ensure_capabilities() +} +lspconfig.jsonls.setup { + coq.lsp_ensure_capabilities() +} diff --git a/lua/config/plugins.lua b/lua/config/plugins.lua index 08ac555..fb7ecfc 100644 --- a/lua/config/plugins.lua +++ b/lua/config/plugins.lua @@ -1,19 +1,5 @@ return { - { "catppuccin/nvim", name = "catppuccin", priority = 1000 }, - { - "hrsh7th/nvim-cmp", - -- load cmp on InsertEnter - event = "InsertEnter", - -- these dependencies will only be loaded when cmp loads - -- dependencies are always lazy-loaded unless specified otherwise - dependencies = { - "hrsh7th/cmp-nvim-lsp", - "hrsh7th/cmp-buffer", - }, - config = function() - -- ... - end, - }, + { "catppuccin/nvim", name = "catppuccin", priority = 1000 }, { "nvim-tree/nvim-tree.lua" }, { "folke/which-key.nvim", @@ -39,7 +25,32 @@ return { dependencies = { "mason.nvim" }, }, { "mfussenegger/nvim-lint" }, - { "neovim/nvim-lspconfig" }, + { + "neovim/nvim-lspconfig", + lazy = false, + dependencies = { + -- main one + { "ms-jpq/coq_nvim", branch = "coq" }, + + -- 9000+ Snippets + { "ms-jpq/coq.artifacts", branch = "artifacts" }, + + -- lua & third party sources -- See https://github.com/ms-jpq/coq.thirdparty + -- Need to **configure separately** + { 'ms-jpq/coq.thirdparty', branch = "3p" } + -- - shell repl + -- - nvim lua api + -- - scientific calculator + -- - comment banner + -- - etc + }, + init = function() + vim.g.coq_settings = { + auto_start = true, -- if you want to start COQ at startup + -- Your COQ settings here + } + end, + }, { "williamboman/mason.nvim", "williamboman/mason-lspconfig.nvim", "neovim/nvim-lspconfig" }, { "nvim-treesitter/nvim-treesitter", "nvim-treesitter/nvim-treesitter-context" }, { "stevearc/dressing.nvim" },