diff --git a/home/pc/common/programs/nvim/config.lua b/home/pc/common/programs/nvim/config.lua index 2135441..b7bdd85 100644 --- a/home/pc/common/programs/nvim/config.lua +++ b/home/pc/common/programs/nvim/config.lua @@ -24,6 +24,12 @@ vim.diagnostic.config({ virtual_text = false, }) +vim.keymap.set("n", "q", function() + vim.cmd("hori term") + vim.cmd("startinsert") +end, {}) +vim.keymap.set("t", "", "", {}) + vim.pack.add({ "https://github.com/nvim-treesitter/nvim-treesitter", "https://github.com/hrsh7th/nvim-cmp", @@ -37,6 +43,7 @@ vim.pack.add({ "https://github.com/nvim-telescope/telescope.nvim", "https://github.com/ej-shafran/compile-mode.nvim", "https://github.com/m00qek/baleia.nvim", + "https://github.com/nvim-lualine/lualine.nvim", }) vim.g.compile_mode = { @@ -161,7 +168,7 @@ local colors = { orange = "#fab387", green = "#a6e3a1", yellow = "#f9e2af", - blue = "#f5c2e7", + pink = "#f5c2e7", magenta = "#cba6f7", cyan = "#94e2d5", @@ -327,21 +334,21 @@ local groups = { ["@property"] = { fg = colors.type }, ["@constructor"] = { fg = colors.cyan }, - ["@conditional"] = { fg = colors.blue }, - ["@repeat"] = { fg = colors.blue }, + ["@conditional"] = { fg = colors.pink }, + ["@repeat"] = { fg = colors.pink }, ["@label"] = { fg = colors.cyan }, ["@keyword"] = { fg = colors.keyword }, ["@keyword.function"] = { fg = colors.Function }, ["@keyword.function.ruby"] = { fg = colors.Function }, - --["@keyword.operator"] = { fg = colors.blue }, - --["@operator"] = { fg = colors.blue }, + --["@keyword.operator"] = { fg = colors.pink }, + --["@operator"] = { fg = colors.pink }, ["@exception"] = { fg = colors.magenta }, ["@type"] = { fg = colors.bright_cyan }, ["@type.builtin"] = { fg = colors.cyan, italic = true }, - ["@type.qualifier"] = { fg = colors.blue }, + ["@type.qualifier"] = { fg = colors.pink }, ["@structure"] = { fg = colors.magenta }, - ["@include"] = { fg = colors.blue }, + ["@include"] = { fg = colors.pink }, ["@variable"] = { fg = colors.variable }, ["@variable.builtin"] = { fg = colors.variable }, @@ -350,14 +357,14 @@ local groups = { ["@text.strong"] = { fg = colors.number, bold = true }, -- bold ["@text.emphasis"] = { fg = colors.yellow, italic = true }, -- italic ["@text.underline"] = { fg = colors.number }, - ["@text.title"] = { fg = colors.blue, bold = true }, -- title + ["@text.title"] = { fg = colors.pink, bold = true }, -- title ["@text.literal"] = { fg = colors.number }, -- inline code ["@text.uri"] = { fg = colors.yellow, italic = true, underline = true }, -- urls ["@text.reference"] = { fg = colors.number, bold = true }, ["@tag"] = { fg = colors.cyan }, ["@tag.attribute"] = { fg = colors.number }, - ["@tag.delimiter"] = { fg = colors.blue }, + ["@tag.delimiter"] = { fg = colors.pink }, -- Semantic ["@class"] = { fg = colors.cyan }, @@ -391,12 +398,12 @@ local groups = { htmlArg = { fg = colors.orange }, htmlBold = { fg = colors.yellow, bold = true }, htmlEndTag = { fg = colors.cyan }, - htmlH1 = { fg = colors.blue }, - htmlH2 = { fg = colors.blue }, - htmlH3 = { fg = colors.blue }, - htmlH4 = { fg = colors.blue }, - htmlH5 = { fg = colors.blue }, - htmlH6 = { fg = colors.blue }, + htmlH1 = { fg = colors.pink }, + htmlH2 = { fg = colors.pink }, + htmlH3 = { fg = colors.pink }, + htmlH4 = { fg = colors.pink }, + htmlH5 = { fg = colors.pink }, + htmlH6 = { fg = colors.pink }, htmlItalic = { fg = colors.magenta, italic = true }, htmlLink = { fg = colors.magenta, underline = true }, htmlSpecialChar = { fg = colors.yellow }, @@ -467,3 +474,50 @@ do end end -- }} + +-- https://github.com/nvim-lualine/lualine.nvim/blob/master/examples/bubbles.lua +local bubbles_theme = { + normal = { + a = { fg = colors.bg, bg = colors.magenta }, + b = { fg = colors.bg, bg = colors.magenta }, + c = { fg = colors.bg, bg = colors.bg }, + }, + + insert = { a = { fg = colors.bg, bg = colors.green } }, + visual = { a = { fg = colors.bg, bg = colors.cyan } }, + replace = { a = { fg = colors.bg, bg = colors.red } }, + + inactive = { + a = { fg = colors.fg, bg = colors.bg }, + b = { fg = colors.fg, bg = colors.bg }, + c = { fg = colors.fg }, + }, +} + +require('lualine').setup { + options = { + theme = bubbles_theme, + component_separators = '', + section_separators = { left = '', right = '' }, + }, + sections = { + lualine_a = { { 'mode', separator = { left = '' }, right_padding = 2 } }, + lualine_b = { 'filename', 'branch' }, + lualine_c = {}, + lualine_x = {}, + lualine_y = { 'filetype', 'progress' }, + lualine_z = { + { 'location', separator = { right = '' }, left_padding = 2 }, + }, + }, + inactive_sections = { + lualine_a = { 'filename' }, + lualine_b = {}, + lualine_c = {}, + lualine_x = {}, + lualine_y = {}, + lualine_z = { 'location' }, + }, + tabline = {}, + extensions = {}, +}