Lualine and LSP tweaks
This commit is contained in:
parent
80befc33f8
commit
c8ac4bf07f
@ -23,6 +23,8 @@ vim.diagnostic.config({
|
||||
virtual_text = false,
|
||||
})
|
||||
|
||||
vim.keymap.set("n", "<Leader>ci", vim.diagnostic.open_float, { desc = "Display diagnostic Code Info" })
|
||||
|
||||
-- Gimme pretty icons
|
||||
lsp.set_sign_icons({
|
||||
error = '✘',
|
||||
@ -37,6 +39,7 @@ lsp.on_attach(function(_, buffnr)
|
||||
vim.keymap.set("n", "gd", vim.lsp.buf.definition, opts)
|
||||
vim.keymap.set("n", "gr", vim.lsp.buf.references, opts)
|
||||
vim.keymap.set("n", "K", vim.lsp.buf.hover, opts)
|
||||
vim.keymap.set("n", "<Leader>ca", vim.lsp.buf.code_action, opts)
|
||||
vim.keymap.set("n", "<Leader>re", vim.lsp.buf.rename, opts)
|
||||
vim.keymap.set({ "n", "i" }, "<C-h>", vim.lsp.buf.signature_help, opts)
|
||||
|
||||
@ -53,8 +56,6 @@ lsp.format_on_save({
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
require("lsp-inlayhints").setup()
|
||||
|
||||
lsp.setup()
|
||||
|
||||
require("lsp-inlayhints").setup()
|
||||
|
31
after/plugin/lualine.lua
Normal file
31
after/plugin/lualine.lua
Normal file
@ -0,0 +1,31 @@
|
||||
local overseer = require("overseer")
|
||||
|
||||
local task_status = {
|
||||
"overseer",
|
||||
colored = true,
|
||||
symbols = {
|
||||
[overseer.STATUS.FAILURE] = "✗ ",
|
||||
[overseer.STATUS.CANCELED] = "o ",
|
||||
[overseer.STATUS.SUCCESS] = "✓ ",
|
||||
[overseer.STATUS.RUNNING] = "⟳ ",
|
||||
},
|
||||
}
|
||||
|
||||
require("lualine").setup({
|
||||
sections = {
|
||||
lualine_b = {
|
||||
"branch",
|
||||
"diff",
|
||||
{
|
||||
"diagnostics",
|
||||
symbols = { error = "E:", warn = "W:", info = "I:", hint = "H:" }
|
||||
},
|
||||
},
|
||||
lualine_x = {
|
||||
task_status,
|
||||
"encoding",
|
||||
{ "fileformat", icons_enabled = false },
|
||||
"filetype"
|
||||
}
|
||||
},
|
||||
})
|
@ -102,32 +102,9 @@ local function spec(use)
|
||||
use {
|
||||
"nvim-lualine/lualine.nvim",
|
||||
requires = {
|
||||
{ "nvim-tree/nvim-web-devicons" }
|
||||
},
|
||||
config = function()
|
||||
local overseer = require("overseer")
|
||||
local task_status = {
|
||||
"overseer",
|
||||
colored = true,
|
||||
symbols = {
|
||||
[overseer.STATUS.FAILURE] = "✗ ",
|
||||
[overseer.STATUS.CANCELED] = "o",
|
||||
[overseer.STATUS.SUCCESS] = "✓ ",
|
||||
[overseer.STATUS.RUNNING] = "⟳ ",
|
||||
},
|
||||
{ "nvim-tree/nvim-web-devicons" },
|
||||
{ "stevearc/overseer.nvim" },
|
||||
}
|
||||
|
||||
require("lualine").setup({
|
||||
sections = {
|
||||
lualine_x = {
|
||||
task_status,
|
||||
"encoding",
|
||||
{ "fileformat", icons_enabled = false },
|
||||
"filetype"
|
||||
}
|
||||
},
|
||||
})
|
||||
end
|
||||
}
|
||||
|
||||
use {
|
||||
|
Loading…
Reference in New Issue
Block a user