First Commit
This commit is contained in:
BIN
data/.DS_Store
vendored
Normal file
BIN
data/.DS_Store
vendored
Normal file
Binary file not shown.
6
data/lsp_servers/bash.lua
Normal file
6
data/lsp_servers/bash.lua
Normal file
@ -0,0 +1,6 @@
|
||||
local lsp_config = require('nvim-lspconfig')
|
||||
local on_attach = require('lsp/on_attach')
|
||||
|
||||
lsp_config.bashls.setup({
|
||||
on_attach = on_attach
|
||||
})
|
||||
21
data/lsp_servers/css.lua
Normal file
21
data/lsp_servers/css.lua
Normal file
@ -0,0 +1,21 @@
|
||||
local lsp_config = require('nvim-lspconfig')
|
||||
local on_attach = require('lsp/on_attach')
|
||||
|
||||
lsp_config.cssls.setup({
|
||||
filetypes = { 'css', 'sass', 'scss' },
|
||||
settings = {
|
||||
css = {
|
||||
validate = true
|
||||
},
|
||||
sass = {
|
||||
validate = true
|
||||
},
|
||||
scss = {
|
||||
validate = true
|
||||
}
|
||||
},
|
||||
on_attach = function(client)
|
||||
client.resolved_capabilities.document_formatting = false
|
||||
on_attach(client)
|
||||
end
|
||||
})
|
||||
9
data/lsp_servers/html.lua
Normal file
9
data/lsp_servers/html.lua
Normal file
@ -0,0 +1,9 @@
|
||||
local lsp_config = require('plugins/nvim-lspconfig')
|
||||
local on_attach = require('lsp/on_attach')
|
||||
|
||||
lsp_config.html.setup({
|
||||
on_attach = function(client)
|
||||
client.resolved_capabilities.document_formatting = false
|
||||
on_attach(client)
|
||||
end
|
||||
})
|
||||
37
data/lsp_servers/init.lua
Normal file
37
data/lsp_servers/init.lua
Normal file
@ -0,0 +1,37 @@
|
||||
vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(
|
||||
vim.lsp.diagnostic.on_publish_diagnostics,
|
||||
{
|
||||
underline = true,
|
||||
virtual_text = {
|
||||
prefix = "●",
|
||||
spacing = 2,
|
||||
},
|
||||
update_in_insert = true,
|
||||
severity_sort = true,
|
||||
}
|
||||
)
|
||||
|
||||
vim.fn.sign_define("LspDiagnosticsSignError", {
|
||||
text = "✖",
|
||||
numhl = "LspDiagnosticsDefaultError",
|
||||
})
|
||||
vim.fn.sign_define("LspDiagnosticsSignWarning", {
|
||||
text = "▲",
|
||||
numhl = "LspDiagnosticsDefaultWarning",
|
||||
})
|
||||
vim.fn.sign_define("LspDiagnosticsSignInformation", {
|
||||
text = "●",
|
||||
numhl = "LspDiagnosticsDefaultInformation",
|
||||
})
|
||||
vim.fn.sign_define("LspDiagnosticsSignHint", {
|
||||
text = "✱",
|
||||
numhl = "LspDiagnosticsDefaultHint",
|
||||
})
|
||||
|
||||
require "lsp/bash"
|
||||
require "lsp/css"
|
||||
require "lsp/html"
|
||||
require "lsp/json"
|
||||
require "lsp/typescript"
|
||||
require "lsp/vim"
|
||||
require "lsp/vim"
|
||||
9
data/lsp_servers/json.lua
Normal file
9
data/lsp_servers/json.lua
Normal file
@ -0,0 +1,9 @@
|
||||
local lsp_config = require('plugins/nvim-lspconfig')
|
||||
local on_attach = require('lsp/on_attach')
|
||||
|
||||
lsp_config.jsonls.setup({
|
||||
on_attach = function(client)
|
||||
client.resolved_capabilities.document_formatting = false
|
||||
on_attach(client)
|
||||
end
|
||||
})
|
||||
29
data/lsp_servers/lua.lua
Normal file
29
data/lsp_servers/lua.lua
Normal file
@ -0,0 +1,29 @@
|
||||
local lsp_config = require('nvim-lspconfig')
|
||||
local on_attach = require('lsp/on_attach')
|
||||
|
||||
lsp_config.sumneko_lua.setup({
|
||||
on_attach = on_attach,
|
||||
settings = {
|
||||
Lua = {
|
||||
runtime = {
|
||||
version = 'LuaJIT',
|
||||
},
|
||||
diagnostics = {
|
||||
enable = true,
|
||||
globals = {
|
||||
"vim",
|
||||
"describe",
|
||||
"it",
|
||||
"before_each",
|
||||
"after_each"
|
||||
}
|
||||
},
|
||||
workspace = {
|
||||
library = {
|
||||
[vim.fn.expand('$VIMRUNTIME/lua')] = true,
|
||||
[vim.fn.expand('$VIMRUNTIME/lua/vim/lsp')] = true
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
})
|
||||
9
data/lsp_servers/theme_check.lua
Normal file
9
data/lsp_servers/theme_check.lua
Normal file
@ -0,0 +1,9 @@
|
||||
local lsp_config = require('plugins/nvim-lspconfig')
|
||||
local on_attach = require('lsp/on_attach')
|
||||
|
||||
lsp_config.tsserver.setup({
|
||||
on_attach = function(client)
|
||||
client.resolved_capabilities.document_formatting = false
|
||||
on_attach(client)
|
||||
end
|
||||
})
|
||||
9
data/lsp_servers/typescript.lua
Normal file
9
data/lsp_servers/typescript.lua
Normal file
@ -0,0 +1,9 @@
|
||||
local lsp_config = require('nvim-lspconfig')
|
||||
local on_attach = require('lsp/on_attach')
|
||||
|
||||
lsp_config.tsserver.setup({
|
||||
on_attach = function(client)
|
||||
client.resolved_capabilities.document_formatting = false
|
||||
on_attach(client)
|
||||
end
|
||||
})
|
||||
6
data/lsp_servers/vim.lua
Normal file
6
data/lsp_servers/vim.lua
Normal file
@ -0,0 +1,6 @@
|
||||
local lsp_config = require('nvim-lspconfig')
|
||||
local on_attach = require('lsp/on_attach')
|
||||
|
||||
lsp_config.vimls.setup({
|
||||
on_attach = on_attach
|
||||
})
|
||||
Reference in New Issue
Block a user