Wed, 28 Aug 2024 04:44:05 -0500
add assign types gopls hint too
1014 | 1 | return { |
1084 | 2 | -- mason is nonlazy so my executable tests work |
1064 | 3 | { "williamboman/mason.nvim", config = true }, |
1014 | 4 | |
5 | { | |
1068 | 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 | 8 | event = { "BufReadPre", "BufNewFile" }, |
9 | dependencies = { | |
1096 | 10 | { "williamboman/mason-lspconfig.nvim", config = true }, |
1068 | 11 | }, |
1084 | 12 | config = function(_, _) |
1096 | 13 | local capabilities = require("cmp_nvim_lsp").default_capabilities() |
14 | ||
1014 | 15 | require("mason-lspconfig").setup_handlers({ |
16 | function(server) | |
1096 | 17 | require("lspconfig")[server].setup({ capabilities = capabilities }) |
1014 | 18 | end, |
1064 | 19 | gopls = function() |
1022 | 20 | require("lspconfig").gopls.setup({ |
1096 | 21 | capabilities = capabilities, |
1177
93b5d2db30bc
more gopls config. add inlay hint toggle
Meredith Howard <mhoward@roomag.org>
parents:
1174
diff
changeset
|
22 | settings = { |
1178
8993dc4128de
add assign types gopls hint too
Meredith Howard <mhoward@roomag.org>
parents:
1177
diff
changeset
|
23 | -- https://github.com/golang/tools/blob/master/gopls/doc/settings.md |
1177
93b5d2db30bc
more gopls config. add inlay hint toggle
Meredith Howard <mhoward@roomag.org>
parents:
1174
diff
changeset
|
24 | gopls = { |
93b5d2db30bc
more gopls config. add inlay hint toggle
Meredith Howard <mhoward@roomag.org>
parents:
1174
diff
changeset
|
25 | analyses = { |
93b5d2db30bc
more gopls config. add inlay hint toggle
Meredith Howard <mhoward@roomag.org>
parents:
1174
diff
changeset
|
26 | unusedvariable = true, |
93b5d2db30bc
more gopls config. add inlay hint toggle
Meredith Howard <mhoward@roomag.org>
parents:
1174
diff
changeset
|
27 | useany = true, |
93b5d2db30bc
more gopls config. add inlay hint toggle
Meredith Howard <mhoward@roomag.org>
parents:
1174
diff
changeset
|
28 | }, |
93b5d2db30bc
more gopls config. add inlay hint toggle
Meredith Howard <mhoward@roomag.org>
parents:
1174
diff
changeset
|
29 | hints = { |
1178
8993dc4128de
add assign types gopls hint too
Meredith Howard <mhoward@roomag.org>
parents:
1177
diff
changeset
|
30 | assignVariableTypes = true, |
1177
93b5d2db30bc
more gopls config. add inlay hint toggle
Meredith Howard <mhoward@roomag.org>
parents:
1174
diff
changeset
|
31 | constantValues = true, |
93b5d2db30bc
more gopls config. add inlay hint toggle
Meredith Howard <mhoward@roomag.org>
parents:
1174
diff
changeset
|
32 | rangeVariableTypes = true, |
93b5d2db30bc
more gopls config. add inlay hint toggle
Meredith Howard <mhoward@roomag.org>
parents:
1174
diff
changeset
|
33 | }, |
93b5d2db30bc
more gopls config. add inlay hint toggle
Meredith Howard <mhoward@roomag.org>
parents:
1174
diff
changeset
|
34 | vulncheck = "Imports", |
93b5d2db30bc
more gopls config. add inlay hint toggle
Meredith Howard <mhoward@roomag.org>
parents:
1174
diff
changeset
|
35 | gofumpt = true, |
93b5d2db30bc
more gopls config. add inlay hint toggle
Meredith Howard <mhoward@roomag.org>
parents:
1174
diff
changeset
|
36 | staticcheck = true, |
93b5d2db30bc
more gopls config. add inlay hint toggle
Meredith Howard <mhoward@roomag.org>
parents:
1174
diff
changeset
|
37 | }, |
93b5d2db30bc
more gopls config. add inlay hint toggle
Meredith Howard <mhoward@roomag.org>
parents:
1174
diff
changeset
|
38 | }, |
1022 | 39 | }) |
1059
dc0095e5bbc8
disable rubocop and formatting in solargraph, add standardrb glue
Meredith Howard <mhoward@roomag.org>
parents:
1055
diff
changeset
|
40 | end, |
1064 | 41 | solargraph = function() |
1059
dc0095e5bbc8
disable rubocop and formatting in solargraph, add standardrb glue
Meredith Howard <mhoward@roomag.org>
parents:
1055
diff
changeset
|
42 | require("lspconfig").solargraph.setup({ |
1096 | 43 | capabilities = capabilities, |
1064 | 44 | init_options = { formatting = false }, |
1059
dc0095e5bbc8
disable rubocop and formatting in solargraph, add standardrb glue
Meredith Howard <mhoward@roomag.org>
parents:
1055
diff
changeset
|
45 | }) |
dc0095e5bbc8
disable rubocop and formatting in solargraph, add standardrb glue
Meredith Howard <mhoward@roomag.org>
parents:
1055
diff
changeset
|
46 | end, |
1014 | 47 | }) |
48 | end, | |
49 | }, | |
1128
30d81fbc6a7b
add actions-preview.nvim
Meredith Howard <mhoward@roomag.org>
parents:
1120
diff
changeset
|
50 | |
1146
2c9d3c1940a4
Add catlee/pull_diags.nvim
Meredith Howard <mhoward@roomag.org>
parents:
1135
diff
changeset
|
51 | { "j-hui/fidget.nvim", event = "LspAttach", config = true }, |
2c9d3c1940a4
Add catlee/pull_diags.nvim
Meredith Howard <mhoward@roomag.org>
parents:
1135
diff
changeset
|
52 | |
1128
30d81fbc6a7b
add actions-preview.nvim
Meredith Howard <mhoward@roomag.org>
parents:
1120
diff
changeset
|
53 | { |
30d81fbc6a7b
add actions-preview.nvim
Meredith Howard <mhoward@roomag.org>
parents:
1120
diff
changeset
|
54 | "aznhe21/actions-preview.nvim", |
1152
59d9ca2ec2fd
Match LSP maps to neovim 0.10 defs
Meredith Howard <mhoward@roomag.org>
parents:
1149
diff
changeset
|
55 | event = "LspAttach", |
1128
30d81fbc6a7b
add actions-preview.nvim
Meredith Howard <mhoward@roomag.org>
parents:
1120
diff
changeset
|
56 | opts = { |
30d81fbc6a7b
add actions-preview.nvim
Meredith Howard <mhoward@roomag.org>
parents:
1120
diff
changeset
|
57 | nui = { |
30d81fbc6a7b
add actions-preview.nvim
Meredith Howard <mhoward@roomag.org>
parents:
1120
diff
changeset
|
58 | keymap = { close = { "<ESC>", "<C-c>", "q" } }, |
30d81fbc6a7b
add actions-preview.nvim
Meredith Howard <mhoward@roomag.org>
parents:
1120
diff
changeset
|
59 | }, |
30d81fbc6a7b
add actions-preview.nvim
Meredith Howard <mhoward@roomag.org>
parents:
1120
diff
changeset
|
60 | }, |
30d81fbc6a7b
add actions-preview.nvim
Meredith Howard <mhoward@roomag.org>
parents:
1120
diff
changeset
|
61 | }, |
1148
bca491e2be91
Fix lsp_signature.nvim behavior
Meredith Howard <mhoward@roomag.org>
parents:
1146
diff
changeset
|
62 | |
bca491e2be91
Fix lsp_signature.nvim behavior
Meredith Howard <mhoward@roomag.org>
parents:
1146
diff
changeset
|
63 | { |
bca491e2be91
Fix lsp_signature.nvim behavior
Meredith Howard <mhoward@roomag.org>
parents:
1146
diff
changeset
|
64 | "ray-x/lsp_signature.nvim", |
bca491e2be91
Fix lsp_signature.nvim behavior
Meredith Howard <mhoward@roomag.org>
parents:
1146
diff
changeset
|
65 | branch = "master", |
1154
dc04a7db1e83
Fix signature_help toggle
Meredith Howard <mhoward@roomag.org>
parents:
1152
diff
changeset
|
66 | event = "VeryLazy", |
1148
bca491e2be91
Fix lsp_signature.nvim behavior
Meredith Howard <mhoward@roomag.org>
parents:
1146
diff
changeset
|
67 | opts = { |
1154
dc04a7db1e83
Fix signature_help toggle
Meredith Howard <mhoward@roomag.org>
parents:
1152
diff
changeset
|
68 | toggle_key = "<C-S>", |
1149
4af7c8156683
One more lsp_signature change
Meredith Howard <mhoward@roomag.org>
parents:
1148
diff
changeset
|
69 | select_signature_key = "<M-n>", |
1148
bca491e2be91
Fix lsp_signature.nvim behavior
Meredith Howard <mhoward@roomag.org>
parents:
1146
diff
changeset
|
70 | toggle_key_flip_floatwin_setting = true, |
bca491e2be91
Fix lsp_signature.nvim behavior
Meredith Howard <mhoward@roomag.org>
parents:
1146
diff
changeset
|
71 | doc_lines = 0, |
bca491e2be91
Fix lsp_signature.nvim behavior
Meredith Howard <mhoward@roomag.org>
parents:
1146
diff
changeset
|
72 | floating_window = true, |
bca491e2be91
Fix lsp_signature.nvim behavior
Meredith Howard <mhoward@roomag.org>
parents:
1146
diff
changeset
|
73 | fix_pos = true, |
bca491e2be91
Fix lsp_signature.nvim behavior
Meredith Howard <mhoward@roomag.org>
parents:
1146
diff
changeset
|
74 | hint_enable = false, |
bca491e2be91
Fix lsp_signature.nvim behavior
Meredith Howard <mhoward@roomag.org>
parents:
1146
diff
changeset
|
75 | }, |
bca491e2be91
Fix lsp_signature.nvim behavior
Meredith Howard <mhoward@roomag.org>
parents:
1146
diff
changeset
|
76 | }, |
1014 | 77 | } |