-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathlsp.lua
78 lines (67 loc) · 1.49 KB
/
lsp.lua
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
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities = require("blink.cmp").get_lsp_capabilities(capabilities)
capabilities = vim.tbl_deep_extend("force", capabilities, {
workspace = {
didChangeWatchedFiles = {
relativePatternSupport = true,
},
},
})
local lspconfig = require "lspconfig"
lspconfig.rust_analyzer.setup {}
lspconfig.lua_ls.setup {
filetypes = { "lua" },
settings = {
Lua = {
runtime = {
version = "LuaJIT",
},
completion = {
callSnippet = "Replace",
},
diagnostics = {
globals = { "vim" },
},
format = {
defaultConfig = {
},
},
hint = {
enable = true,
arrayIndex = 'Enable',
},
},
},
}
lspconfig.bashls.setup {}
lspconfig.gopls.setup {}
lspconfig.ts_ls.setup {
settings = {
completions = {
completeFunctionCalls = true,
},
},
}
lspconfig.nixd.setup({
cmd = { "nixd" },
settings = {
nixd = {
nixpkgs = {
expr = "import <nixpkgs> { }",
},
formatting = {
command = { "nixfmt" },
},
options = {
home_manager = {
expr = '(builtins.getFlake \"/Users/pwnwriter/.local/nix\").homeConfigurations.earlymoon.options',
},
nix_darwin = {
expr = '(builtins.getFlake \"/Users/pwnwriter/.local/nix\").darwinConfigurations.earlymoon.options',
},
},
},
},
})
lspconfig.gleam.setup {}
lspconfig.zls.setup {}