Compare commits

...

2 Commits

Author SHA1 Message Date
Rob Watson d16d653a85 chore(nvim): allow completion in comments 2024-01-15 08:41:29 +01:00
Rob Watson 90ec768ab3 chore(nvim): lualine config 2024-01-15 08:41:29 +01:00
2 changed files with 8 additions and 10 deletions

View File

@ -22,6 +22,8 @@ require("lualine").setup({
options = { options = {
icons_enabled = false, icons_enabled = false,
theme = "nord", theme = "nord",
component_separators = "",
section_separators = { left = "", right = "" },
}, },
sections = { sections = {
lualine_a = { lualine_a = {
@ -37,7 +39,7 @@ require("lualine").setup({
lualine_c = { lualine_c = {
{ {
"branch", "branch",
padding = { left = 0 }, padding = 1,
}, },
-- render coloured output from gitsigns, this doesn't seem to work with b:gitsigns_status: -- render coloured output from gitsigns, this doesn't seem to work with b:gitsigns_status:
{ {
@ -45,21 +47,21 @@ require("lualine").setup({
return format_diff_element(vim.b.gitsigns_status_dict.added, "+") return format_diff_element(vim.b.gitsigns_status_dict.added, "+")
end, end,
color = { fg = "#a3be8c" }, color = { fg = "#a3be8c" },
padding = 0, padding = 1,
}, },
{ {
function() function()
return format_diff_element(vim.b.gitsigns_status_dict.changed, "~") return format_diff_element(vim.b.gitsigns_status_dict.changed, "~")
end, end,
color = { fg = "#ebcb8b" }, color = { fg = "#ebcb8b" },
padding = 0, padding = 1,
}, },
{ {
function() function()
return format_diff_element(vim.b.gitsigns_status_dict.removed, "-") return format_diff_element(vim.b.gitsigns_status_dict.removed, "-")
end, end,
color = { fg = "#bf616a" }, color = { fg = "#bf616a" },
padding = 0, padding = 1,
}, },
{ {
"diagnostics", "diagnostics",
@ -94,7 +96,7 @@ require("lualine").setup({
padding = { left = 1, right = 0 }, padding = { left = 1, right = 0 },
}, },
}, },
lualine_y = { { "progress", padding = { left = 1, right = 0 } } }, lualine_y = { { "progress", padding = { left = 1, right = 1 } } },
lualine_z = { { "location", padding = { left = 1, right = 1 } } }, lualine_z = { { "location", padding = { left = 1, right = 1 } } },
}, },
inactive_sections = { inactive_sections = {

View File

@ -82,11 +82,7 @@ cmp.setup({
}, },
-- https://github.com/hrsh7th/nvim-cmp/wiki/Advanced-techniques#disabling-completion-in-certain-contexts-such-as-comments -- https://github.com/hrsh7th/nvim-cmp/wiki/Advanced-techniques#disabling-completion-in-certain-contexts-such-as-comments
enabled = function() enabled = function()
local context = require("cmp.config.context") return true
if vim.api.nvim_get_mode().mode == "c" then
return true
end
return not context.in_treesitter_capture("comment") and not context.in_syntax_group("Comment")
end, end,
formatting = { formatting = {
fields = { "kind", "abbr", "menu" }, fields = { "kind", "abbr", "menu" },