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

Sun, 05 Mar 2023 18:47:45 -0500

author
Meredith Howard <mhoward@roomag.org>
date
Sun, 05 Mar 2023 18:47:45 -0500
changeset 1062
77bf3b44f6f9
parent 1059
dc0095e5bbc8
child 1064
fcfa295076a8
permissions
-rw-r--r--

Add format-on-write for elixir and go

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

mercurial