forked from rafi/vim-config
-
Notifications
You must be signed in to change notification settings - Fork 3
/
lua.lua
43 lines (38 loc) · 1.03 KB
/
lua.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
-- sumneko-lua-language-server settings
--
local plugins_path = vim.fn.stdpath('data') .. '/dein/repos/github.com'
local settings = {
Lua = {
runtime = { version = 'LuaJIT', path = vim.fn.split(package.path, ';') },
diagnostics = {
enable = true,
globals = {'vim', 'use', 'describe', 'it', 'assert', 'before_each', 'after_each'},
},
workspace = {
maxPreload = 2000, -- 1000,
preloadFileSize = 1000, -- 150,
library = {
[vim.fn.stdpath('config') .. '/lua'] = true,
[vim.fn.expand('$VIMRUNTIME/lua')] = true,
[vim.fn.expand('$VIMRUNTIME/lua/vim/lsp')] = true,
[plugins_path .. '/nvim-lua/plenary.nvim'] = true,
-- [plugins_path] = true,
},
},
},
}
local function config(server_config)
server_config.settings = settings
-- See https://github.com/folke/lua-dev.nvim
return require('lua-dev').setup({
lspconfig = server_config,
library = {
vimruntime = true, -- runtime path
types = true, -- full signature, docs and completion
plugins = false,
},
})
end
return {
config = config,
}