feat: add lsp-status to lualine

main
mandlm 2022-04-26 08:42:45 +02:00
parent 02317e2177
commit 610c1a9a83
Signed by: mandlm
GPG Key ID: 4AA25D647AA54CC7
2 changed files with 20 additions and 2 deletions

View File

@ -31,7 +31,7 @@ return require('packer').startup(function(use)
-- commenting
use {
'numToStr/Comment.nvim',
config = function() require('Comment').setup() end
config = function() require('Comment').setup({}) end
}
-- session handling
@ -60,6 +60,9 @@ return require('packer').startup(function(use)
config = function()
require('lualine').setup({
options = { globalstatus = true },
sections = {
lualine_c = { "filename", "require('lsp-status').status()" }
},
extensions = { "toggleterm" }
})
end
@ -122,6 +125,9 @@ return require('packer').startup(function(use)
-- lua plugin development
"folke/lua-dev.nvim",
-- lsp status
"nvim-lua/lsp-status.nvim",
},
config = function() require('plugins.nvim-lsp-setup') end,
}

View File

@ -1,3 +1,13 @@
local lsp_status = require("lsp-status")
lsp_status.config({
current_function = false,
show_filename = false,
diagnostics = true,
})
lsp_status.register_progress()
local utils = require("nvim-lsp-setup.utils")
require("nvim-lsp-setup").setup({
default_mappings = false,
mappings = {
@ -17,9 +27,11 @@ require("nvim-lsp-setup").setup({
["<C-n>"] = "lua vim.diagnostic.goto_next()",
},
on_attach = function(client)
require("nvim-lsp-setup.utils").format_on_save(client)
utils.format_on_save(client)
require("illuminate").on_attach(client)
lsp_status.on_attach(client)
end,
capabilities = vim.tbl_extend("keep", vim.lsp.protocol.make_client_capabilities(), lsp_status.capabilities),
servers = {
ansiblels = {},
bashls = {},