nvim tweaks lualine, noice
This commit is contained in:
+31
-34
@@ -217,7 +217,7 @@ map(
|
|||||||
)
|
)
|
||||||
|
|
||||||
-- LSP
|
-- LSP
|
||||||
map("n", "<leader>ll", "<cmd>e ~/.local/state/nvim/lsp.log<cr>")
|
map("n", "<leader>ld", "<cmd>e ~/.local/state/nvim/lsp.log<cr>")
|
||||||
map("n", "<leader>lc", "<cmd>checkhealth<cr>")
|
map("n", "<leader>lc", "<cmd>checkhealth<cr>")
|
||||||
local diagnostic_goto = function(count, severity)
|
local diagnostic_goto = function(count, severity)
|
||||||
severity = severity and vim.diagnostic.severity[severity] or nil
|
severity = severity and vim.diagnostic.severity[severity] or nil
|
||||||
@@ -377,7 +377,6 @@ local function makespec_lspconfig()
|
|||||||
return {
|
return {
|
||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
lazy = false,
|
lazy = false,
|
||||||
dependencies = { { "j-hui/fidget.nvim", opts = {} } },
|
|
||||||
event = { "BufReadPost", "BufNewFile" },
|
event = { "BufReadPost", "BufNewFile" },
|
||||||
cmd = { "LspInfo", "LspRestart", "LspStart", "LspStop" },
|
cmd = { "LspInfo", "LspRestart", "LspStart", "LspStop" },
|
||||||
keys = { { "<F4>", "<cmd>LspInfo<cr>", noremap = true } },
|
keys = { { "<F4>", "<cmd>LspInfo<cr>", noremap = true } },
|
||||||
@@ -504,27 +503,33 @@ local function makespec_lualine()
|
|||||||
options = { theme = "auto", globalstatus = false },
|
options = { theme = "auto", globalstatus = false },
|
||||||
extensions = { "fugitive", "neo-tree", "lazy" },
|
extensions = { "fugitive", "neo-tree", "lazy" },
|
||||||
sections = {
|
sections = {
|
||||||
lualine_c = {
|
lualine_a = { "mode" },
|
||||||
{ "filename", file_status = true, path = 1, shorting_target = 0 },
|
lualine_b = {},
|
||||||
{ "filetype", icon_only = true, separator = " ", padding = { left = 1, right = 0 } },
|
lualine_c = { { "filename", path = 1, shorting_target = 0 } },
|
||||||
},
|
|
||||||
lualine_x = {
|
lualine_x = {
|
||||||
{ 'require("noice").api.status.message.get_hl()' },
|
{ 'require("noice").api.status.message.get()', color = { fg = "#99c794" } },
|
||||||
{ 'require("noice").api.status.command.get()', color = { fg = "#ff9e64" } },
|
{ 'require("noice").api.status.mode.get()', color = { fg = "#65737e" } },
|
||||||
{ 'require("noice").api.status.mode.get()', color = { fg = "#ff9e64" } },
|
{ 'require("noice").api.status.command.get()', color = { fg = "goldenrod" } },
|
||||||
},
|
},
|
||||||
lualine_y = { "progress", "location" },
|
lualine_y = {
|
||||||
lualine_z = { { function() return " " .. os.date("%R") end } },
|
"encoding",
|
||||||
|
"filetype",
|
||||||
|
{ "location", separator = "of", padding = { left = 1, right = 1 } },
|
||||||
|
"vim.api.nvim_buf_line_count(0)",
|
||||||
|
},
|
||||||
|
lualine_z = { { function() return " " .. os.date("%R") end, color = { bg = "goldenrod" } } },
|
||||||
},
|
},
|
||||||
inactive_sections = {
|
inactive_sections = {
|
||||||
lualine_a = {},
|
lualine_a = {},
|
||||||
lualine_b = {},
|
lualine_b = {},
|
||||||
lualine_c = {
|
lualine_c = {
|
||||||
{ "filename", file_status = true, path = 1, shorting_target = 0 },
|
{ "filename", file_status = true, path = 1, shorting_target = 0 },
|
||||||
{ "filetype", icon_only = true, separator = " ", padding = { left = 1, right = 0 } },
|
|
||||||
},
|
},
|
||||||
lualine_x = {},
|
lualine_x = {},
|
||||||
lualine_y = { "progress", "location" },
|
lualine_y = {
|
||||||
|
{ "location", separator = "of", padding = { left = 1, right = 1 } },
|
||||||
|
"vim.api.nvim_buf_line_count(0)",
|
||||||
|
},
|
||||||
lualine_z = {},
|
lualine_z = {},
|
||||||
},
|
},
|
||||||
tabline = {
|
tabline = {
|
||||||
@@ -938,7 +943,7 @@ local function makespec_snacks()
|
|||||||
{ "<leader>fc", function() Snacks.picker.files({ cwd = "/home/hjalmarlucius/dotfiles" }) end, desc = "Find Config" },
|
{ "<leader>fc", function() Snacks.picker.files({ cwd = "/home/hjalmarlucius/dotfiles" }) end, desc = "Find Config" },
|
||||||
{ "<leader>fn", function() Snacks.picker.files({ cwd = "/home/hjalmarlucius/notes" }) end, desc = "Find Note", },
|
{ "<leader>fn", function() Snacks.picker.files({ cwd = "/home/hjalmarlucius/notes" }) end, desc = "Find Note", },
|
||||||
-- logs
|
-- logs
|
||||||
{ "<leader>lm", function() Snacks.picker.notifications() end, desc = "Notification History" },
|
{ "<leader>ll", function() Snacks.picker.notifications() end, desc = "Notification History" },
|
||||||
-- code
|
-- code
|
||||||
{ "<leader>cS", function() Snacks.picker.lsp_symbols() end, desc = "LSP Symbols" },
|
{ "<leader>cS", function() Snacks.picker.lsp_symbols() end, desc = "LSP Symbols" },
|
||||||
-- replaced by Trouble
|
-- replaced by Trouble
|
||||||
@@ -1308,34 +1313,27 @@ end
|
|||||||
local function makespec_noice()
|
local function makespec_noice()
|
||||||
return {
|
return {
|
||||||
"folke/noice.nvim",
|
"folke/noice.nvim",
|
||||||
dependencies = { "MunifTanjim/nui.nvim" },
|
event = "VeryLazy",
|
||||||
|
dependencies = { "MunifTanjim/nui.nvim", "rcarriga/nvim-notify" },
|
||||||
opts = {
|
opts = {
|
||||||
cmdline = { enabled = true, view = "cmdline_popup" },
|
|
||||||
messages = {
|
messages = {
|
||||||
enabled = true, -- enables the Noice messages UI
|
enabled = true,
|
||||||
view = "mini", -- default view for messages
|
view = "notify",
|
||||||
view_error = "notify", -- view for errors
|
view_error = "notify",
|
||||||
view_warn = "mini", -- view for warnings
|
view_warn = "notify",
|
||||||
view_history = "popup", -- view for :messages
|
view_history = "popup",
|
||||||
view_search = false,
|
view_search = false,
|
||||||
},
|
},
|
||||||
popupmenu = { enabled = true },
|
|
||||||
notify = { enabled = true, view = "mini" },
|
|
||||||
lsp = {
|
lsp = {
|
||||||
override = {
|
override = {
|
||||||
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
|
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
|
||||||
["vim.lsp.util.stylize_markdown"] = true,
|
["vim.lsp.util.stylize_markdown"] = true,
|
||||||
},
|
},
|
||||||
progress = { enabled = false },
|
signature = { enabled = true, auto_open = { enabled = true, throttle = 50 } },
|
||||||
hover = { enabled = true },
|
|
||||||
signature = { enabled = true, auto_open = { enabled = true, throttle = 0 } },
|
|
||||||
message = { enabled = true, view = "notify" },
|
|
||||||
documentation = { view = "hover" },
|
|
||||||
},
|
},
|
||||||
-- you can enable a preset for easier configuration
|
|
||||||
presets = {
|
presets = {
|
||||||
command_palette = true, -- position the cmdline and popupmenu together
|
command_palette = true,
|
||||||
long_message_to_split = true, -- long messages will be sent to a split
|
long_message_to_split = true,
|
||||||
},
|
},
|
||||||
routes = {
|
routes = {
|
||||||
{ filter = { event = "msg_show", kind = "search_count" }, opts = { skip = true } },
|
{ filter = { event = "msg_show", kind = "search_count" }, opts = { skip = true } },
|
||||||
@@ -1343,9 +1341,8 @@ local function makespec_noice()
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
keys = {
|
keys = {
|
||||||
{ "<leader>ld", function() require("noice").cmd("dismiss") end, desc = "Noice dismiss" },
|
{ "<leader>lx", function() require("noice").cmd("dismiss") end, desc = "Noice dismiss" },
|
||||||
{ "<leader>le", function() require("noice").cmd("errors") end, desc = "Noice errors" },
|
{ "<leader>lh", function() require("noice").cmd("all") end, desc = "Noice history" },
|
||||||
{ "<leader>lh", function() require("noice").cmd("history") end, desc = "Noice history" },
|
|
||||||
{ "<leader>ls", function() require("noice").cmd("stats") end, desc = "Noice stats" },
|
{ "<leader>ls", function() require("noice").cmd("stats") end, desc = "Noice stats" },
|
||||||
{ "<leader>un", function() require("noice").cmd("enable") end, desc = "Enable Noice" },
|
{ "<leader>un", function() require("noice").cmd("enable") end, desc = "Enable Noice" },
|
||||||
{ "<leader>uN", function() require("noice").cmd("disable") end, desc = "Disable Noice" },
|
{ "<leader>uN", function() require("noice").cmd("disable") end, desc = "Disable Noice" },
|
||||||
|
|||||||
Reference in New Issue
Block a user