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

Wed, 27 Dec 2023 01:39:00 -0600

author
Meredith Howard <mhoward@roomag.org>
date
Wed, 27 Dec 2023 01:39:00 -0600
changeset 1137
f767f8cd6a9f
parent 1135
7a17b7825b5f
child 1146
2c9d3c1940a4
permissions
-rw-r--r--

add asciidoctor and timetrap stubs

1014
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
1 return {
1084
76588dcdb04a Add neodev.nvim
Meredith Howard <mhoward@roomag.org>
parents: 1068
diff changeset
2 -- mason is nonlazy so my executable tests work
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",
1131
f3044a1658fc nvim: switch to preferring last symver tag / add exceptions
Meredith Howard <mhoward@roomag.org>
parents: 1128
diff changeset
7 branch = "master",
1068
537a428597b5 tweak lazy loading
Meredith Howard <mhoward@roomag.org>
parents: 1064
diff changeset
8 event = { "BufReadPre", "BufNewFile" },
537a428597b5 tweak lazy loading
Meredith Howard <mhoward@roomag.org>
parents: 1064
diff changeset
9 dependencies = {
1096
8bb51fcd6f2a clean up lsp config
Meredith Howard <mhoward@roomag.org>
parents: 1084
diff changeset
10 { "williamboman/mason-lspconfig.nvim", config = true },
8bb51fcd6f2a clean up lsp config
Meredith Howard <mhoward@roomag.org>
parents: 1084
diff changeset
11 { "folke/neodev.nvim", config = true },
1135
7a17b7825b5f switch fidget.nvim back to main
Meredith Howard <mhoward@roomag.org>
parents: 1131
diff changeset
12 { "j-hui/fidget.nvim", config = true },
1068
537a428597b5 tweak lazy loading
Meredith Howard <mhoward@roomag.org>
parents: 1064
diff changeset
13 },
1084
76588dcdb04a Add neodev.nvim
Meredith Howard <mhoward@roomag.org>
parents: 1068
diff changeset
14 config = function(_, _)
1096
8bb51fcd6f2a clean up lsp config
Meredith Howard <mhoward@roomag.org>
parents: 1084
diff changeset
15 local capabilities = require("cmp_nvim_lsp").default_capabilities()
8bb51fcd6f2a clean up lsp config
Meredith Howard <mhoward@roomag.org>
parents: 1084
diff changeset
16
1014
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
17 require("mason-lspconfig").setup_handlers({
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
18 function(server)
1096
8bb51fcd6f2a clean up lsp config
Meredith Howard <mhoward@roomag.org>
parents: 1084
diff changeset
19 require("lspconfig")[server].setup({ capabilities = capabilities })
1014
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
20 end,
1064
fcfa295076a8 Apply stylua
Meredith Howard <mhoward@roomag.org>
parents: 1059
diff changeset
21 gopls = function()
1022
d509e282ae10 More nvim config
Meredith Howard <mhoward@roomag.org>
parents: 1019
diff changeset
22 require("lspconfig").gopls.setup({
1096
8bb51fcd6f2a clean up lsp config
Meredith Howard <mhoward@roomag.org>
parents: 1084
diff changeset
23 capabilities = capabilities,
1064
fcfa295076a8 Apply stylua
Meredith Howard <mhoward@roomag.org>
parents: 1059
diff changeset
24 settings = { gopls = { gofumpt = true } },
1022
d509e282ae10 More nvim config
Meredith Howard <mhoward@roomag.org>
parents: 1019
diff changeset
25 })
1059
dc0095e5bbc8 disable rubocop and formatting in solargraph, add standardrb glue
Meredith Howard <mhoward@roomag.org>
parents: 1055
diff changeset
26 end,
1064
fcfa295076a8 Apply stylua
Meredith Howard <mhoward@roomag.org>
parents: 1059
diff changeset
27 solargraph = function()
1059
dc0095e5bbc8 disable rubocop and formatting in solargraph, add standardrb glue
Meredith Howard <mhoward@roomag.org>
parents: 1055
diff changeset
28 require("lspconfig").solargraph.setup({
1096
8bb51fcd6f2a clean up lsp config
Meredith Howard <mhoward@roomag.org>
parents: 1084
diff changeset
29 capabilities = capabilities,
1064
fcfa295076a8 Apply stylua
Meredith Howard <mhoward@roomag.org>
parents: 1059
diff changeset
30 init_options = { formatting = false },
1059
dc0095e5bbc8 disable rubocop and formatting in solargraph, add standardrb glue
Meredith Howard <mhoward@roomag.org>
parents: 1055
diff changeset
31 })
dc0095e5bbc8 disable rubocop and formatting in solargraph, add standardrb glue
Meredith Howard <mhoward@roomag.org>
parents: 1055
diff changeset
32 end,
1014
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
33 })
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
34 end,
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
35 },
1128
30d81fbc6a7b add actions-preview.nvim
Meredith Howard <mhoward@roomag.org>
parents: 1120
diff changeset
36
30d81fbc6a7b add actions-preview.nvim
Meredith Howard <mhoward@roomag.org>
parents: 1120
diff changeset
37 {
30d81fbc6a7b add actions-preview.nvim
Meredith Howard <mhoward@roomag.org>
parents: 1120
diff changeset
38 "aznhe21/actions-preview.nvim",
30d81fbc6a7b add actions-preview.nvim
Meredith Howard <mhoward@roomag.org>
parents: 1120
diff changeset
39 keys = "<leader>ca",
30d81fbc6a7b add actions-preview.nvim
Meredith Howard <mhoward@roomag.org>
parents: 1120
diff changeset
40 opts = {
30d81fbc6a7b add actions-preview.nvim
Meredith Howard <mhoward@roomag.org>
parents: 1120
diff changeset
41 nui = {
30d81fbc6a7b add actions-preview.nvim
Meredith Howard <mhoward@roomag.org>
parents: 1120
diff changeset
42 keymap = { close = { "<ESC>", "<C-c>", "q" } },
30d81fbc6a7b add actions-preview.nvim
Meredith Howard <mhoward@roomag.org>
parents: 1120
diff changeset
43 },
30d81fbc6a7b add actions-preview.nvim
Meredith Howard <mhoward@roomag.org>
parents: 1120
diff changeset
44 },
30d81fbc6a7b add actions-preview.nvim
Meredith Howard <mhoward@roomag.org>
parents: 1120
diff changeset
45 config = function(_, opts)
30d81fbc6a7b add actions-preview.nvim
Meredith Howard <mhoward@roomag.org>
parents: 1120
diff changeset
46 require("actions-preview").setup(opts)
30d81fbc6a7b add actions-preview.nvim
Meredith Howard <mhoward@roomag.org>
parents: 1120
diff changeset
47 vim.keymap.set("n", "<leader>ca", require("actions-preview").code_actions, { silent = true })
30d81fbc6a7b add actions-preview.nvim
Meredith Howard <mhoward@roomag.org>
parents: 1120
diff changeset
48 end,
30d81fbc6a7b add actions-preview.nvim
Meredith Howard <mhoward@roomag.org>
parents: 1120
diff changeset
49 },
1014
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
50 }

mercurial