cleanup neovim config
This commit is contained in:
parent
32020bd6d5
commit
161ac02b81
10 changed files with 24 additions and 90 deletions
|
@ -1,34 +0,0 @@
|
|||
local status_ok, gps = pcall(require, "nvim-gps")
|
||||
if not status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
gps.setup({
|
||||
disable_icons = false, -- Setting it to true will disable all icons
|
||||
icons = {
|
||||
["class-name"] = " ", -- Classes and class-like objects
|
||||
["function-name"] = " ", -- Functions
|
||||
["method-name"] = " ", -- Methods (functions inside class-like objects)
|
||||
["container-name"] = "⛶ ", -- Containers (example: lua tables)
|
||||
["tag-name"] = "炙 ", -- Tags (example: html tags)
|
||||
["mapping-name"] = " ",
|
||||
["sequence-name"] = " ",
|
||||
["null-name"] = "[] ",
|
||||
["boolean-name"] = "ﰰﰴ ",
|
||||
["integer-name"] = "# ",
|
||||
["float-name"] = " ",
|
||||
["string-name"] = " ",
|
||||
["array-name"] = " ",
|
||||
["object-name"] = " ",
|
||||
["number-name"] = "# ",
|
||||
["table-name"] = " ",
|
||||
["date-name"] = " ",
|
||||
["date-time-name"] = " ",
|
||||
["inline-table-name"] = " ",
|
||||
["time-name"] = " ",
|
||||
["module-name"] = " ",
|
||||
},
|
||||
separator = " > ",
|
||||
depth = 0,
|
||||
depth_limit_indicator = "..",
|
||||
})
|
|
@ -1,24 +1,3 @@
|
|||
local status_ok, lspconfig = pcall(require, "lspconfig")
|
||||
if not status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
local schemastore_status_ok, schemastore = pcall(require, "schemastore")
|
||||
if not schemastore_status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
lspconfig.jsonls.setup({
|
||||
on_attach = require("user.lsp.handlers").on_attach,
|
||||
capabilities = require("user.lsp.handlers").capabilities,
|
||||
settings = {
|
||||
json = {
|
||||
schemas = require("schemastore").json.schemas(),
|
||||
validate = { enable = true },
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
require("user.lsp.handlers").setup()
|
||||
require("user.lsp.mason")
|
||||
require("user.lsp.nullls")
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
local status_ok, lsp_installer = pcall(require, "nvim-lsp-installer")
|
||||
if not status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
lsp_installer.on_server_ready(function(server)
|
||||
local opts = {
|
||||
on_attach = require("user.lsp.handlers").on_attach,
|
||||
capabilities = require("user.lsp.handlers").capabilities,
|
||||
}
|
||||
|
||||
server:setup(opts)
|
||||
end)
|
|
@ -16,3 +16,4 @@ lspconfig.util.default_config = vim.tbl_extend("force", lspconfig.util.default_c
|
|||
})
|
||||
|
||||
require("user.lsp.settings.sumneko_lua")
|
||||
require("user.lsp.settings.jsonls")
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
local nlsp_status_ok, nlspsettings = pcall(require, "nlspsettings")
|
||||
if not nlsp_status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
nlspsettings.setup({
|
||||
config_home = vim.fn.stdpath("config") .. "/lua/user/lsp/settings",
|
||||
local_settings_dir = ".nlsp-settings",
|
||||
local_settings_root_markers = { ".git" },
|
||||
append_default_schemas = true,
|
||||
loader = "json",
|
||||
})
|
|
@ -1 +0,0 @@
|
|||
{}
|
18
.config/nvim/lua/user/lsp/settings/jsonls.lua
Normal file
18
.config/nvim/lua/user/lsp/settings/jsonls.lua
Normal file
|
@ -0,0 +1,18 @@
|
|||
local status_ok, lspconfig = pcall(require, "lspconfig")
|
||||
if not status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
local schemastore_status_ok, schemastore = pcall(require, "schemastore")
|
||||
if not schemastore_status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
lspconfig.jsonls.setup({
|
||||
settings = {
|
||||
json = {
|
||||
schemas = schemastore.json.schemas(),
|
||||
validate = { enable = true },
|
||||
},
|
||||
},
|
||||
})
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
"Lua.diagnostics.globals": ["vim"]
|
||||
}
|
|
@ -1,9 +1,11 @@
|
|||
local lspconfig = require("lspconfig")
|
||||
|
||||
lspconfig.sumneko_lua.setup({
|
||||
Lua = {
|
||||
diagnostics = {
|
||||
globals = { 'vim' },
|
||||
settings = {
|
||||
Lua = {
|
||||
diagnostics = {
|
||||
globals = { "vim" },
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
"volar.takeOverMode.enabled": true
|
||||
}
|
Reference in a new issue