.config/nvim/lua/plugins/lsp.lua

Sat, 11 Mar 2023 01:51:23 -0500

author
Meredith Howard <mhoward@roomag.org>
date
Sat, 11 Mar 2023 01:51:23 -0500
changeset 1075
3b88450bda15
parent 1068
537a428597b5
child 1084
76588dcdb04a
permissions
-rw-r--r--

port custom autocmds to lua

1014
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
1 return {
1068
537a428597b5 tweak lazy loading
Meredith Howard <mhoward@roomag.org>
parents: 1064
diff changeset
2 -- mason is nonlazy so my executable tests works
1064
fcfa295076a8 Apply stylua
Meredith Howard <mhoward@roomag.org>
parents: 1059
diff changeset
3 { "williamboman/mason.nvim", config = true },
1014
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
4
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
5 {
1068
537a428597b5 tweak lazy loading
Meredith Howard <mhoward@roomag.org>
parents: 1064
diff changeset
6 "neovim/nvim-lspconfig",
537a428597b5 tweak lazy loading
Meredith Howard <mhoward@roomag.org>
parents: 1064
diff changeset
7 event = { "BufReadPre", "BufNewFile" },
537a428597b5 tweak lazy loading
Meredith Howard <mhoward@roomag.org>
parents: 1064
diff changeset
8 dependencies = {
537a428597b5 tweak lazy loading
Meredith Howard <mhoward@roomag.org>
parents: 1064
diff changeset
9 "williamboman/mason-lspconfig.nvim",
537a428597b5 tweak lazy loading
Meredith Howard <mhoward@roomag.org>
parents: 1064
diff changeset
10 { "j-hui/fidget.nvim", config = true },
537a428597b5 tweak lazy loading
Meredith Howard <mhoward@roomag.org>
parents: 1064
diff changeset
11 },
1014
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
12 config = function(plugin, opts)
1019
7e42fd320166 Further nvim work
Meredith Howard <mhoward@roomag.org>
parents: 1015
diff changeset
13 require("mason-lspconfig").setup()
1014
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
14 require("mason-lspconfig").setup_handlers({
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
15 function(server)
1055
ba91fd3b81e1 completion fixes, but leave omni off
Meredith Howard <mhoward@roomag.org>
parents: 1044
diff changeset
16 require("lspconfig")[server].setup({
1064
fcfa295076a8 Apply stylua
Meredith Howard <mhoward@roomag.org>
parents: 1059
diff changeset
17 capabilities = require("cmp_nvim_lsp").default_capabilities(),
1055
ba91fd3b81e1 completion fixes, but leave omni off
Meredith Howard <mhoward@roomag.org>
parents: 1044
diff changeset
18 })
1014
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
19 end,
1064
fcfa295076a8 Apply stylua
Meredith Howard <mhoward@roomag.org>
parents: 1059
diff changeset
20 gopls = function()
1022
d509e282ae10 More nvim config
Meredith Howard <mhoward@roomag.org>
parents: 1019
diff changeset
21 require("lspconfig").gopls.setup({
1064
fcfa295076a8 Apply stylua
Meredith Howard <mhoward@roomag.org>
parents: 1059
diff changeset
22 capabilities = require("cmp_nvim_lsp").default_capabilities(),
fcfa295076a8 Apply stylua
Meredith Howard <mhoward@roomag.org>
parents: 1059
diff changeset
23 settings = { gopls = { gofumpt = true } },
1022
d509e282ae10 More nvim config
Meredith Howard <mhoward@roomag.org>
parents: 1019
diff changeset
24 })
1059
dc0095e5bbc8 disable rubocop and formatting in solargraph, add standardrb glue
Meredith Howard <mhoward@roomag.org>
parents: 1055
diff changeset
25 end,
1064
fcfa295076a8 Apply stylua
Meredith Howard <mhoward@roomag.org>
parents: 1059
diff changeset
26 solargraph = function()
1059
dc0095e5bbc8 disable rubocop and formatting in solargraph, add standardrb glue
Meredith Howard <mhoward@roomag.org>
parents: 1055
diff changeset
27 require("lspconfig").solargraph.setup({
1064
fcfa295076a8 Apply stylua
Meredith Howard <mhoward@roomag.org>
parents: 1059
diff changeset
28 capabilities = require("cmp_nvim_lsp").default_capabilities(),
fcfa295076a8 Apply stylua
Meredith Howard <mhoward@roomag.org>
parents: 1059
diff changeset
29 init_options = { formatting = false },
1059
dc0095e5bbc8 disable rubocop and formatting in solargraph, add standardrb glue
Meredith Howard <mhoward@roomag.org>
parents: 1055
diff changeset
30 })
dc0095e5bbc8 disable rubocop and formatting in solargraph, add standardrb glue
Meredith Howard <mhoward@roomag.org>
parents: 1055
diff changeset
31 end,
1014
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
32 })
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
33 end,
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
34 },
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
35 }

mercurial