From 183e3d2d5095dc82838957fa3e4dcf28509da339 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Jane=C5=BEi=C4=8D?= Date: Thu, 18 May 2023 11:51:48 +0200 Subject: [PATCH] chore: run stylua --- lua/autocmd.lua | 3 +-- lua/plugins/cmp.lua | 6 +++--- lua/plugins/common.lua | 13 ++++++------- lua/plugins/telescope.lua | 3 +-- 4 files changed, 11 insertions(+), 14 deletions(-) diff --git a/lua/autocmd.lua b/lua/autocmd.lua index 62492e6..d3c30c1 100644 --- a/lua/autocmd.lua +++ b/lua/autocmd.lua @@ -1,5 +1,4 @@ -vim.api.nvim_create_autocmd({ 'BufEnter, BufWinEnter' }, -{ command = 'set colorcolumn=120,80,88', pattern = { '*.py', '*.pyi' } }) +vim.api.nvim_create_autocmd({ 'BufEnter, BufWinEnter' }, { command = 'set colorcolumn=120,80,88', pattern = { '*.py', '*.pyi' } }) vim.api.nvim_create_autocmd({ 'BufEnter, BufWinEnter' }, { command = 'set colorcolumn=80,100', pattern = { '*.rs' } }) vim.api.nvim_create_autocmd({ 'BufEnter, BufWinEnter' }, { command = 'set splitright', pattern = { '*' } }) vim.api.nvim_create_autocmd({ 'BufEnter, BufWinEnter' }, { command = 'set splitbelow', pattern = { '*' } }) diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index dfd2eb1..2c2f1d5 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -1,8 +1,8 @@ function leave_snippet() if - ((vim.v.event.old_mode == 's' and vim.v.event.new_mode == 'n') or vim.v.event.old_mode == 'i') - and require('luasnip').session.current_nodes[vim.api.nvim_get_current_buf()] - and not require('luasnip').session.jump_active + ((vim.v.event.old_mode == 's' and vim.v.event.new_mode == 'n') or vim.v.event.old_mode == 'i') + and require('luasnip').session.current_nodes[vim.api.nvim_get_current_buf()] + and not require('luasnip').session.jump_active then require('luasnip').unlink_current() end diff --git a/lua/plugins/common.lua b/lua/plugins/common.lua index ca4c032..dbeed27 100644 --- a/lua/plugins/common.lua +++ b/lua/plugins/common.lua @@ -24,22 +24,22 @@ return { -- NOTE: Second, plugins that require setup call (done via opts) -- Useful plugin to show you pending keybinds. - { 'folke/which-key.nvim', opts = {} }, + { 'folke/which-key.nvim', opts = {} }, -- "gc" to comment visual regions/lines - { 'numToStr/Comment.nvim', opts = {} }, + { 'numToStr/Comment.nvim', opts = {} }, -- colorize in files { 'norcalli/nvim-colorizer.lua', opts = {} }, -- autopairs on newline - { 'windwp/nvim-autopairs', opts = {} }, + { 'windwp/nvim-autopairs', opts = {} }, -- highlighting for comments - { 'folke/todo-comments.nvim', dependencies = 'nvim-lua/plenary.nvim', opts = {} }, + { 'folke/todo-comments.nvim', dependencies = 'nvim-lua/plenary.nvim', opts = {} }, -- cargo crates - { 'saecki/crates.nvim', dependencies = 'nvim-lua/plenary.nvim', opts = {} }, + { 'saecki/crates.nvim', dependencies = 'nvim-lua/plenary.nvim', opts = {} }, -- newage search plugin { @@ -123,8 +123,7 @@ return { end, config = function() vim.api.nvim_set_keymap('n', 'gt', ':GitBlameToggle', { desc = '[G]it Blame [T]oggle', noremap = true }) - vim.api.nvim_set_keymap('n', 'gu', ':GitBlameOpenCommitURL', - { desc = '[G]it Blame Open Commit [U]rl', noremap = true }) + vim.api.nvim_set_keymap('n', 'gu', ':GitBlameOpenCommitURL', { desc = '[G]it Blame Open Commit [U]rl', noremap = true }) end, }, diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index 03a1890..ffad760 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -89,8 +89,7 @@ return { -- extensions vim.api.nvim_set_keymap('n', 'tc', ':TodoTelescope', { desc = '[T]odo [c]omments', noremap = true }) - vim.api.nvim_set_keymap('n', 'hm', ':Telescope harpoon marks', - { desc = '[H]arpoon [m]arks', noremap = true }) + vim.api.nvim_set_keymap('n', 'hm', ':Telescope harpoon marks', { desc = '[H]arpoon [m]arks', noremap = true }) end, },