Tue, 19 Sep 2023 17:12:00 -0500
fix error when unnamed buffers can't be written
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", |
7 | event = { "BufReadPre", "BufNewFile" }, | |
8 | dependencies = { | |
1096 | 9 | { "williamboman/mason-lspconfig.nvim", config = true }, |
10 | { "folke/neodev.nvim", config = true }, | |
1120
8f8a93daa98c
Move fidget.nvim to "legacy" branch
Meredith Howard <mhoward@roomag.org>
parents:
1096
diff
changeset
|
11 | { "j-hui/fidget.nvim", config = true, branch = "legacy" }, |
1068 | 12 | }, |
1084 | 13 | config = function(_, _) |
1096 | 14 | local capabilities = require("cmp_nvim_lsp").default_capabilities() |
15 | ||
1014 | 16 | require("mason-lspconfig").setup_handlers({ |
17 | function(server) | |
1096 | 18 | require("lspconfig")[server].setup({ capabilities = capabilities }) |
1014 | 19 | end, |
1064 | 20 | gopls = function() |
1022 | 21 | require("lspconfig").gopls.setup({ |
1096 | 22 | capabilities = capabilities, |
1064 | 23 | settings = { gopls = { gofumpt = true } }, |
1022 | 24 | }) |
1059
dc0095e5bbc8
disable rubocop and formatting in solargraph, add standardrb glue
Meredith Howard <mhoward@roomag.org>
parents:
1055
diff
changeset
|
25 | end, |
1064 | 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({ |
1096 | 28 | capabilities = capabilities, |
1064 | 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 | 32 | }) |
33 | end, | |
34 | }, | |
1128
30d81fbc6a7b
add actions-preview.nvim
Meredith Howard <mhoward@roomag.org>
parents:
1120
diff
changeset
|
35 | |
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 | "aznhe21/actions-preview.nvim", |
30d81fbc6a7b
add actions-preview.nvim
Meredith Howard <mhoward@roomag.org>
parents:
1120
diff
changeset
|
38 | keys = "<leader>ca", |
30d81fbc6a7b
add actions-preview.nvim
Meredith Howard <mhoward@roomag.org>
parents:
1120
diff
changeset
|
39 | opts = { |
30d81fbc6a7b
add actions-preview.nvim
Meredith Howard <mhoward@roomag.org>
parents:
1120
diff
changeset
|
40 | nui = { |
30d81fbc6a7b
add actions-preview.nvim
Meredith Howard <mhoward@roomag.org>
parents:
1120
diff
changeset
|
41 | keymap = { close = { "<ESC>", "<C-c>", "q" } }, |
30d81fbc6a7b
add actions-preview.nvim
Meredith Howard <mhoward@roomag.org>
parents:
1120
diff
changeset
|
42 | }, |
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 | config = function(_, opts) |
30d81fbc6a7b
add actions-preview.nvim
Meredith Howard <mhoward@roomag.org>
parents:
1120
diff
changeset
|
45 | require("actions-preview").setup(opts) |
30d81fbc6a7b
add actions-preview.nvim
Meredith Howard <mhoward@roomag.org>
parents:
1120
diff
changeset
|
46 | 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
|
47 | end, |
30d81fbc6a7b
add actions-preview.nvim
Meredith Howard <mhoward@roomag.org>
parents:
1120
diff
changeset
|
48 | }, |
1014 | 49 | } |