i dont even know
This commit is contained in:
@ -1,6 +1,19 @@
|
|||||||
-- disable underline
|
-- disable underline
|
||||||
vim.diagnostic.handlers.underline.show = function() end
|
vim.diagnostic.handlers.underline.show = function() end
|
||||||
|
|
||||||
|
local signs = {
|
||||||
|
Error = " ",
|
||||||
|
Warning = " ",
|
||||||
|
Warn = " ",
|
||||||
|
Hint = "",
|
||||||
|
Info = " ",
|
||||||
|
Other = "",
|
||||||
|
}
|
||||||
|
for type, icon in pairs(signs) do
|
||||||
|
local hl = "DiagnosticSign" .. type
|
||||||
|
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl })
|
||||||
|
end
|
||||||
|
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"folke/trouble.nvim",
|
"folke/trouble.nvim",
|
||||||
@ -22,24 +35,35 @@ return {
|
|||||||
{ "]g", ":lua vim.diagnostic.goto_next()<CR>" },
|
{ "]g", ":lua vim.diagnostic.goto_next()<CR>" },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
-- {
|
||||||
|
-- "rachartier/tiny-inline-diagnostic.nvim",
|
||||||
|
-- event = "LspAttach",
|
||||||
|
-- priority = 1000, -- needs to be loaded in first
|
||||||
|
-- config = function()
|
||||||
|
-- vim.diagnostic.config({ virtual_text = false })
|
||||||
|
--
|
||||||
|
-- require("tiny-inline-diagnostic").setup({
|
||||||
|
-- preset = "classic", -- Can be: "modern", "classic", "minimal", "powerline", ghost", "simple", "nonerdfont", "amongus"
|
||||||
|
--
|
||||||
|
-- -- Show the source of the diagnostic.
|
||||||
|
-- show_source = false,
|
||||||
|
--
|
||||||
|
-- -- Use your defined signs in the diagnostic config table.
|
||||||
|
-- use_icons_from_diagnostic = true,
|
||||||
|
--
|
||||||
|
-- -- Enable diagnostic message on all lines.
|
||||||
|
-- multilines = true,
|
||||||
|
--
|
||||||
|
-- -- Show all diagnostics on the cursor line.
|
||||||
|
-- show_all_diags_on_cursorline = false,
|
||||||
|
-- })
|
||||||
|
-- end,
|
||||||
|
-- },
|
||||||
{
|
{
|
||||||
"https://git.sr.ht/~whynothugo/lsp_lines.nvim",
|
"https://git.sr.ht/~whynothugo/lsp_lines.nvim",
|
||||||
event = { "LspAttach" },
|
event = { "LspAttach" },
|
||||||
name = "lsp_lines.nvim",
|
name = "lsp_lines.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
local signs = {
|
|
||||||
Error = " ",
|
|
||||||
Warning = " ",
|
|
||||||
Warn = " ",
|
|
||||||
Hint = "",
|
|
||||||
Info = " ",
|
|
||||||
Other = "",
|
|
||||||
}
|
|
||||||
for type, icon in pairs(signs) do
|
|
||||||
local hl = "DiagnosticSign" .. type
|
|
||||||
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl })
|
|
||||||
end
|
|
||||||
|
|
||||||
require("lsp_lines").setup()
|
require("lsp_lines").setup()
|
||||||
|
|
||||||
-- vim.schedule(function()
|
-- vim.schedule(function()
|
||||||
|
@ -2,84 +2,78 @@ local use_google = require("utils").use_google
|
|||||||
local flags = require("utils").flags
|
local flags = require("utils").flags
|
||||||
|
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"ray-x/lsp_signature.nvim",
|
"ray-x/lsp_signature.nvim",
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
opts = {
|
opts = {
|
||||||
floating_window = true,
|
floating_window = true,
|
||||||
hint_prefix = " ",
|
hint_prefix = " ",
|
||||||
},
|
},
|
||||||
config = function(_, opts)
|
config = function(_, opts)
|
||||||
require("lsp_signature").setup(opts)
|
require("lsp_signature").setup(opts)
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"luozhiya/lsp-virtual-improved.nvim",
|
"kosayoda/nvim-lightbulb",
|
||||||
event = { "LspAttach" },
|
commit = "1cae7b7153ae98dcf1b11173a443ac1b6d8e3d49",
|
||||||
config = function()
|
event = { "LspAttach" },
|
||||||
require("lsp-virtual-improved").setup()
|
opts = {
|
||||||
end,
|
autocmd = { enabled = true },
|
||||||
},
|
virtual_text = {
|
||||||
{
|
enabled = true,
|
||||||
"kosayoda/nvim-lightbulb",
|
text = " ",
|
||||||
commit = "1cae7b7153ae98dcf1b11173a443ac1b6d8e3d49",
|
hl = "DiagnosticWarn",
|
||||||
event = { "LspAttach" },
|
},
|
||||||
opts = {
|
sign = { enabled = false },
|
||||||
autocmd = { enabled = true },
|
},
|
||||||
virtual_text = {
|
},
|
||||||
enabled = true,
|
{
|
||||||
text = " ",
|
"L3MON4D3/LuaSnip",
|
||||||
hl = "DiagnosticWarn",
|
build = "make install_jsregexp",
|
||||||
},
|
config = function()
|
||||||
sign = { enabled = false },
|
require("luasnip.loaders.from_vscode").lazy_load()
|
||||||
},
|
end,
|
||||||
},
|
dependencies = { "rafamadriz/friendly-snippets" },
|
||||||
{
|
},
|
||||||
"L3MON4D3/LuaSnip",
|
{
|
||||||
build = "make install_jsregexp",
|
"hinell/lsp-timeout.nvim",
|
||||||
config = function()
|
event = { "LspAttach" },
|
||||||
require("luasnip.loaders.from_vscode").lazy_load()
|
dependencies = { "neovim/nvim-lspconfig" },
|
||||||
end,
|
-- cond = not use_google(),
|
||||||
dependencies = { "rafamadriz/friendly-snippets" },
|
config = function()
|
||||||
},
|
vim.g.lspTimeoutConfig = {
|
||||||
{
|
filetypes = {
|
||||||
"hinell/lsp-timeout.nvim",
|
ignore = { -- filetypes to ignore; empty by default
|
||||||
event = { "LspAttach" },
|
"gdscript",
|
||||||
dependencies = { "neovim/nvim-lspconfig" },
|
"rust",
|
||||||
-- cond = not use_google(),
|
}, -- for these filetypes
|
||||||
config = function()
|
},
|
||||||
vim.g.lspTimeoutConfig = {
|
}
|
||||||
filetypes = {
|
end,
|
||||||
ignore = { -- filetypes to ignore; empty by default
|
},
|
||||||
"gdscript",
|
{
|
||||||
"rust",
|
"ray-x/go.nvim",
|
||||||
}, -- for these filetypes
|
dependencies = { -- optional packages
|
||||||
},
|
"ray-x/guihua.lua",
|
||||||
}
|
"neovim/nvim-lspconfig",
|
||||||
end,
|
"nvim-treesitter/nvim-treesitter",
|
||||||
},
|
},
|
||||||
{
|
-- cond = not use_google(),
|
||||||
"ray-x/go.nvim",
|
config = function()
|
||||||
dependencies = { -- optional packages
|
local capabilities = flags.blink
|
||||||
"ray-x/guihua.lua",
|
and require("blink.cmp").get_lsp_capabilities(vim.lsp.protocol.make_client_capabilities())
|
||||||
"neovim/nvim-lspconfig",
|
or require("cmp_nvim_lsp").default_capabilities(vim.lsp.protocol.make_client_capabilities())
|
||||||
"nvim-treesitter/nvim-treesitter",
|
capabilities.offsetEncoding = { "utf-16" }
|
||||||
},
|
require("go").setup({
|
||||||
-- cond = not use_google(),
|
lsp_cfg = { capabilities = capabilities },
|
||||||
config = function()
|
lsp_keymaps = false,
|
||||||
local capabilities = flags.blink
|
lsp_inlay_hints = {
|
||||||
and require("blink.cmp").get_lsp_capabilities(vim.lsp.protocol.make_client_capabilities())
|
enable = not use_google(), -- doesn't work with ciderlsp
|
||||||
or require("cmp_nvim_lsp").default_capabilities(vim.lsp.protocol.make_client_capabilities())
|
},
|
||||||
capabilities.offsetEncoding = { "utf-16" }
|
})
|
||||||
require("go").setup({
|
-- Run gofmt + goimports on save
|
||||||
lsp_cfg = { capabilities = capabilities },
|
|
||||||
lsp_keymaps = false,
|
|
||||||
lsp_inlay_hints = {
|
|
||||||
enable = not use_google(), -- doesn't work with ciderlsp
|
|
||||||
},
|
|
||||||
})
|
|
||||||
-- Run gofmt + goimports on save
|
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
local format_sync_grp = vim.api.nvim_create_augroup("goimports", {})
|
local format_sync_grp = vim.api.nvim_create_augroup("goimports", {})
|
||||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||||
pattern = "*.go",
|
pattern = "*.go",
|
||||||
@ -117,25 +111,64 @@ return {
|
|||||||
config = function()
|
config = function()
|
||||||
local lsp_status = require("lsp-status")
|
local lsp_status = require("lsp-status")
|
||||||
lsp_status.register_progress()
|
lsp_status.register_progress()
|
||||||
|
=======
|
||||||
|
local format_sync_grp = vim.api.nvim_create_augroup("goimports", {})
|
||||||
|
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||||
|
pattern = "*.go",
|
||||||
|
callback = function()
|
||||||
|
require("go.format").goimports()
|
||||||
|
end,
|
||||||
|
group = format_sync_grp,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
ft = { "go", "gomod" },
|
||||||
|
build = ':lua require("go.install").update_all_sync()', -- if you need to install/update all binaries
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"neovim/nvim-lspconfig",
|
||||||
|
dependencies = {
|
||||||
|
"hrsh7th/nvim-cmp",
|
||||||
|
"nvim-lua/lsp-status.nvim",
|
||||||
|
"VonHeikemen/lsp-zero.nvim",
|
||||||
|
},
|
||||||
|
keys = {
|
||||||
|
{ "<leader>F", ":lua vim.lsp.buf.format()<CR>" },
|
||||||
|
{ "<leader>rn", ":lua vim.lsp.buf.rename()<CR>" },
|
||||||
|
{ "L", ":lua vim.lsp.buf.hover()<CR>" },
|
||||||
|
{ "gr", ":Telescope lsp_references<CR>" },
|
||||||
|
{ "gd", ":lua vim.lsp.buf.definition()<CR>" },
|
||||||
|
-- { "gd", "<cmd>Telescope lsp_definitions<CR>" },
|
||||||
|
{ "gD", ":tab split | lua vim.lsp.buf.definition()<CR>" },
|
||||||
|
{ "gi", ":lua vim.lsp.buf.implementation()<CR>" },
|
||||||
|
{ "gI", ":lua vim.lsp.buf.implementation()<CR>" },
|
||||||
|
{ "gR", ":lua vim.lsp.buf.references()<CR>" },
|
||||||
|
{ "gt", ":lua vim.lsp.buf.type_definition()<CR>" },
|
||||||
|
{ "<C-g>", ":lua vim.lsp.buf.signature_help()<CR>" },
|
||||||
|
{ "<C-g>", ":lua vim.lsp.buf.signature_help()<CR>", mode = "i" },
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
local lsp_status = require("lsp-status")
|
||||||
|
lsp_status.register_progress()
|
||||||
|
>>>>>>> cc84d4d (i dont even know)
|
||||||
|
|
||||||
local capabilities = flags.blink
|
local capabilities = flags.blink
|
||||||
and require("blink.cmp").get_lsp_capabilities(vim.lsp.protocol.make_client_capabilities())
|
and require("blink.cmp").get_lsp_capabilities(vim.lsp.protocol.make_client_capabilities())
|
||||||
or require("cmp_nvim_lsp").default_capabilities(vim.lsp.protocol.make_client_capabilities())
|
or require("cmp_nvim_lsp").default_capabilities(vim.lsp.protocol.make_client_capabilities())
|
||||||
capabilities = vim.tbl_extend("keep", capabilities or {}, lsp_status.capabilities)
|
capabilities = vim.tbl_extend("keep", capabilities or {}, lsp_status.capabilities)
|
||||||
capabilities.offsetEncoding = { "utf-16" }
|
capabilities.offsetEncoding = { "utf-16" }
|
||||||
|
|
||||||
local lspconfig = require("lspconfig")
|
local lspconfig = require("lspconfig")
|
||||||
local configs = require("lspconfig.configs")
|
local configs = require("lspconfig.configs")
|
||||||
require("config.lsp-google").setup(capabilities)
|
require("config.lsp-google").setup(capabilities)
|
||||||
|
|
||||||
-- Godot
|
-- Godot
|
||||||
lspconfig.gdscript.setup({
|
lspconfig.gdscript.setup({
|
||||||
-- flags = {
|
-- flags = {
|
||||||
-- debounce_text_changes = 2000, -- Wait 5 seconds before sending didChange
|
-- debounce_text_changes = 2000, -- Wait 5 seconds before sending didChange
|
||||||
-- },
|
-- },
|
||||||
})
|
})
|
||||||
vim.cmd([[autocmd FileType gdscript setlocal commentstring=#\ %s]])
|
vim.cmd([[autocmd FileType gdscript setlocal commentstring=#\ %s]])
|
||||||
vim.cmd([[autocmd FileType gdscript setlocal autoindent noexpandtab tabstop=4 shiftwidth=4]])
|
vim.cmd([[autocmd FileType gdscript setlocal autoindent noexpandtab tabstop=4 shiftwidth=4]])
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user