-
-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathls_config.lua
More file actions
44 lines (42 loc) · 1.16 KB
/
ls_config.lua
File metadata and controls
44 lines (42 loc) · 1.16 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
local util = require("spring_boot.util")
local M = {
name = "spring-boot",
filetypes = { "java", "yaml", "jproperties" },
root_dir = nil,
init_options = {
workspaceFolders = nil,
enableJdtClasspath = false,
},
settings = {},
handlers = {
["sts/highlight"] = function() end,
["sts/moveCursor"] = function(err, result, ctx, config)
-- TODO: move cursor
return { applied = true }
end,
},
commands = {},
get_language_id = function(bufnr, filetype)
if filetype == "yaml" then
local filename = vim.api.nvim_buf_get_name(bufnr)
if util.is_application_yml_file(filename) then
return "spring-boot-properties-yaml"
end
elseif filetype == "jproperties" then
local filename = vim.api.nvim_buf_get_name(bufnr)
if util.is_application_properties_file(filename) then
return "spring-boot-properties"
end
end
return filetype
end,
capabilities = vim.tbl_deep_extend("force", vim.lsp.protocol.make_client_capabilities(), {
workspace = {
executeCommand = { value = true },
},
}),
on_init = function(client, ctx)
util.boot_ls_init(client, ctx)
end,
}
return M