From c818bf2a6758580063aecf97860bdb1d02789d60 Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Fri, 9 Feb 2024 01:39:40 +0300 Subject: nvim: lua formatting --- .config/nvim/lua/plugins/barbar.lua | 14 +++++++------- .config/nvim/lua/plugins/colorscheme.lua | 2 +- .config/nvim/lua/plugins/lsp.lua | 8 ++++---- .config/nvim/lua/plugins/lualine.lua | 28 ++++++++++++++-------------- .config/nvim/lua/plugins/nvim-ufo.lua | 2 +- .config/nvim/lua/plugins/trouble.lua | 6 ++++-- .config/nvim/lua/plugins/vimwiki.lua | 2 +- 7 files changed, 32 insertions(+), 30 deletions(-) (limited to '.config/nvim/lua/plugins') diff --git a/.config/nvim/lua/plugins/barbar.lua b/.config/nvim/lua/plugins/barbar.lua index 7b6c69d..906c73a 100644 --- a/.config/nvim/lua/plugins/barbar.lua +++ b/.config/nvim/lua/plugins/barbar.lua @@ -49,18 +49,18 @@ return { clickable = false, icons = { diagnostics = { - [vim.diagnostic.severity.ERROR] = {enabled = true, icon = '❌'}, - [vim.diagnostic.severity.WARN] = {enabled = false}, - [vim.diagnostic.severity.INFO] = {enabled = false}, - [vim.diagnostic.severity.HINT] = {enabled = true}, + [vim.diagnostic.severity.ERROR] = { enabled = true, icon = '❌' }, + [vim.diagnostic.severity.WARN] = { enabled = false }, + [vim.diagnostic.severity.INFO] = { enabled = false }, + [vim.diagnostic.severity.HINT] = { enabled = true }, }, filetype = { custom_colors = false, enabled = true, }, - separator = { left = '▎', right = ''}, - modified = { button = ''}, - pinned = { button = '', filename = true, separator = { right = ''}}, + separator = { left = '▎', right = '' }, + modified = { button = '' }, + pinned = { button = '', filename = true, separator = { right = '' } }, }, insert_at_end = false, diff --git a/.config/nvim/lua/plugins/colorscheme.lua b/.config/nvim/lua/plugins/colorscheme.lua index 969d304..b880e26 100644 --- a/.config/nvim/lua/plugins/colorscheme.lua +++ b/.config/nvim/lua/plugins/colorscheme.lua @@ -14,7 +14,7 @@ return { transparent_background = false, term_colors = false, no_italic = true, -- force no italic - no_bold = false, -- force no bold + no_bold = false, -- force no bold integrations = { barbar = true, cmp = true, diff --git a/.config/nvim/lua/plugins/lsp.lua b/.config/nvim/lua/plugins/lsp.lua index d55158e..95f09f1 100644 --- a/.config/nvim/lua/plugins/lsp.lua +++ b/.config/nvim/lua/plugins/lsp.lua @@ -191,10 +191,10 @@ return { progress = { suppress_on_insert = true, - display = { - render_limit = 4, - progress_icon = { - pattern = "triangle", + display = { + render_limit = 4, + progress_icon = { + pattern = "triangle", }, }, diff --git a/.config/nvim/lua/plugins/lualine.lua b/.config/nvim/lua/plugins/lualine.lua index 0da0b89..c4e936e 100644 --- a/.config/nvim/lua/plugins/lualine.lua +++ b/.config/nvim/lua/plugins/lualine.lua @@ -7,7 +7,7 @@ local function lualine_spell() end local conditions = { - spell_on = function () + spell_on = function() return vim.wo.spell end, filetype_is_tex = function() @@ -45,11 +45,11 @@ return { }, }, sections = { - lualine_a = {{'mode', fmt = string.lower}}, - lualine_b = {'branch', + lualine_a = { { 'mode', fmt = string.lower } }, + lualine_b = { 'branch', { 'diff', - diff_color= { + diff_color = { added = { fg = 'LightGreen' }, modified = { fg = 'LightBlue' }, removed = { fg = 'LightRed' }, @@ -58,23 +58,23 @@ return { { lualine_spell, cond = conditions.spell_on, - }}, - lualine_c = {'filename'}, - lualine_x = {encoding, fileformat, 'filetype'}, - lualine_y = {'progress'}, + } }, + lualine_c = { 'filename' }, + lualine_x = { encoding, fileformat, 'filetype' }, + lualine_y = { 'progress' }, lualine_z = { 'location', { - 'diagnostics', - sources = {'nvim_diagnostic'}, - sections = {'error', 'warn', 'info', 'hint'}, - symbols = {error = 'e', warn = 'w', info = 'i', hint = 'h'} - } + 'diagnostics', + sources = { 'nvim_diagnostic' }, + sections = { 'error', 'warn', 'info', 'hint' }, + symbols = { error = 'e', warn = 'w', info = 'i', hint = 'h' } + } } }, inactive_sections = { lualine_a = {}, lualine_b = {}, - lualine_c = {'filename'}, + lualine_c = { 'filename' }, lualine_x = {}, lualine_y = {}, lualine_z = {} diff --git a/.config/nvim/lua/plugins/nvim-ufo.lua b/.config/nvim/lua/plugins/nvim-ufo.lua index a3d69ba..65f079a 100644 --- a/.config/nvim/lua/plugins/nvim-ufo.lua +++ b/.config/nvim/lua/plugins/nvim-ufo.lua @@ -61,7 +61,7 @@ return { end return (filetype == "" or buftype == "nofile") and - "indent" -- only use indent until a file is opened + "indent" -- only use indent until a file is opened or function(bufnr) return require("ufo") .getFolds(bufnr, "lsp") diff --git a/.config/nvim/lua/plugins/trouble.lua b/.config/nvim/lua/plugins/trouble.lua index 6d72bd9..b80aed3 100644 --- a/.config/nvim/lua/plugins/trouble.lua +++ b/.config/nvim/lua/plugins/trouble.lua @@ -5,8 +5,10 @@ return { config = function() local map = require("helpers.keys").map map("n", "xx", function() require("trouble").open() end, "trouble: open") - map("n", "xw", function() require("trouble").open("workspace_diagnostics") end, "trouble: open workspace diagnostics") - map("n", "xd", function() require("trouble").open("document_diagnostics") end, "trouble: open document diagnostics") + map("n", "xw", function() require("trouble").open("workspace_diagnostics") end, + "trouble: open workspace diagnostics") + map("n", "xd", function() require("trouble").open("document_diagnostics") end, + "trouble: open document diagnostics") map("n", "xq", function() require("trouble").open("quickfix") end, "trouble: open quickfix") map("n", "xl", function() require("trouble").open("loclist") end, "trouble: open loclist") map("n", "gR", function() require("trouble").open("lsp_references") end, "trouble: open lsp references") diff --git a/.config/nvim/lua/plugins/vimwiki.lua b/.config/nvim/lua/plugins/vimwiki.lua index ae0c4e5..a114b04 100644 --- a/.config/nvim/lua/plugins/vimwiki.lua +++ b/.config/nvim/lua/plugins/vimwiki.lua @@ -1,7 +1,7 @@ return { { "yigitsever/vimwiki", - init = function () + init = function() vim.g.vimwiki_list = { { path = '/home/yigit/nextcloud/personal_wiki/text', -- cgit v1.2.3-70-g09d2