-
-
Notifications
You must be signed in to change notification settings - Fork 309
Expand file tree
/
Copy pathinit.lua
More file actions
83 lines (83 loc) · 2.29 KB
/
init.lua
File metadata and controls
83 lines (83 loc) · 2.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
return {
{
"srghma/nvimmer-ps",
opts = {}, -- if nil - M.setup wont be called
},
{
"AstroNvim/astrocore",
---@type AstroCoreOpts
opts = {
filetypes = {
extension = { purs = "purescript" },
},
},
},
{
"nvim-treesitter/nvim-treesitter",
optional = true,
opts = function(_, opts)
if opts.ensure_installed ~= "all" then
opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, { "purescript" })
end
end,
},
{
"williamboman/mason-lspconfig.nvim",
optional = true,
opts = function(_, opts)
opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, { "purescriptls" })
end,
},
{
"jay-babu/mason-null-ls.nvim",
optional = true,
opts = function(_, opts)
opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, { "purs-tidy" })
end,
},
{
"WhoIsSethDaniel/mason-tool-installer.nvim",
optional = true,
opts = function(_, opts)
opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, {
"purescript-language-server",
"purescript-tidy",
})
end,
},
{
"stevearc/conform.nvim",
optional = true,
opts = {
formatters_by_ft = {
purescript = { "purs-tidy" },
},
},
},
{
"AstroNvim/astrolsp",
---@type AstroLSPOpts
opts = {
---@diagnostic disable: missing-fields
config = {
purescriptls = {
flags = {
debounce_text_changes = 150,
},
-- root_dir fixes
-- "Problem running build: Reading Spago workspace configuration...\n\n✘ Your spago.yaml doesn't contain a workspace section."
-- when language server is being run in a monorepo (lot of spago.yaml files, but only the top one has "workspace section")
root_dir = function(_) return vim.fn.getcwd() end,
on_attach = function(...) require("nvimmer-ps").setup_on_attach(...) end,
on_init = function(...) require("nvimmer-ps").setup_on_init(...) end,
settings = {
purescript = {
formatter = "purs-tidy",
addSpagoSources = true,
},
},
},
},
},
},
}