From 05053a87b7514c816ae24722fe9c54d27b03c42a Mon Sep 17 00:00:00 2001 From: Laily Date: Tue, 30 Apr 2024 17:43:53 +0800 Subject: [PATCH] fix: disable auto format --- nvim/lua/config/options.lua | 2 + nvim/lua/pluginconfig/barbar.lua | 3 - nvim/lua/pluginconfig/dashboard-nvim.lua | 63 ------ nvim/lua/pluginconfig/fzf-lua.lua | 11 - nvim/lua/pluginconfig/galaxyline.lua | 220 ------------------- nvim/lua/pluginconfig/gitsigns.lua | 18 -- nvim/lua/pluginconfig/hop.lua | 2 - nvim/lua/pluginconfig/init.lua | 39 ---- nvim/lua/pluginconfig/mason.lua | 1 - nvim/lua/pluginconfig/mkdx.lua | 7 - nvim/lua/pluginconfig/neodev.lua | 3 - nvim/lua/pluginconfig/neotest.lua | 10 - nvim/lua/pluginconfig/numb.lua | 4 - nvim/lua/pluginconfig/nvim-autopairs.lua | 123 ----------- nvim/lua/pluginconfig/nvim-cmp.lua | 92 -------- nvim/lua/pluginconfig/nvim-colorizer.lua | 13 -- nvim/lua/pluginconfig/nvim-lint.lua | 20 -- nvim/lua/pluginconfig/nvim-tree.lua | 55 ----- nvim/lua/pluginconfig/nvim-treesitter.lua | 29 --- nvim/lua/pluginconfig/rnvimr.lua | 6 - nvim/lua/pluginconfig/symbols-outline.lua | 1 - nvim/lua/pluginconfig/telescope.lua | 81 ------- nvim/lua/pluginconfig/toggleterm.lua | 50 ----- nvim/lua/pluginconfig/vim-matchup.lua | 2 - nvim/lua/pluginconfig/which-key.lua | 250 ---------------------- nvim/lua/plugins/barbar.lua | 1 + nvim/lua/plugins/conform.lua | 1 + nvim/lua/plugins/nvim-cmp.lua | 3 +- 28 files changed, 6 insertions(+), 1104 deletions(-) delete mode 100644 nvim/lua/pluginconfig/barbar.lua delete mode 100644 nvim/lua/pluginconfig/dashboard-nvim.lua delete mode 100644 nvim/lua/pluginconfig/fzf-lua.lua delete mode 100644 nvim/lua/pluginconfig/galaxyline.lua delete mode 100644 nvim/lua/pluginconfig/gitsigns.lua delete mode 100644 nvim/lua/pluginconfig/hop.lua delete mode 100644 nvim/lua/pluginconfig/init.lua delete mode 100644 nvim/lua/pluginconfig/mason.lua delete mode 100644 nvim/lua/pluginconfig/mkdx.lua delete mode 100644 nvim/lua/pluginconfig/neodev.lua delete mode 100644 nvim/lua/pluginconfig/neotest.lua delete mode 100644 nvim/lua/pluginconfig/numb.lua delete mode 100644 nvim/lua/pluginconfig/nvim-autopairs.lua delete mode 100644 nvim/lua/pluginconfig/nvim-cmp.lua delete mode 100644 nvim/lua/pluginconfig/nvim-colorizer.lua delete mode 100644 nvim/lua/pluginconfig/nvim-lint.lua delete mode 100644 nvim/lua/pluginconfig/nvim-tree.lua delete mode 100644 nvim/lua/pluginconfig/nvim-treesitter.lua delete mode 100644 nvim/lua/pluginconfig/rnvimr.lua delete mode 100644 nvim/lua/pluginconfig/symbols-outline.lua delete mode 100644 nvim/lua/pluginconfig/telescope.lua delete mode 100644 nvim/lua/pluginconfig/toggleterm.lua delete mode 100644 nvim/lua/pluginconfig/vim-matchup.lua delete mode 100644 nvim/lua/pluginconfig/which-key.lua diff --git a/nvim/lua/config/options.lua b/nvim/lua/config/options.lua index e81207d..9bb5d7c 100644 --- a/nvim/lua/config/options.lua +++ b/nvim/lua/config/options.lua @@ -1,3 +1,5 @@ +vim.g.autoformat = false + vim.cmd('set iskeyword+=-') -- treat dash separated words as a word text object" vim.cmd('set shortmess+=c') -- Don't pass messages to |ins-completion-menu|. vim.cmd('set inccommand=split') -- Make substitution work in realtime diff --git a/nvim/lua/pluginconfig/barbar.lua b/nvim/lua/pluginconfig/barbar.lua deleted file mode 100644 index 49c1206..0000000 --- a/nvim/lua/pluginconfig/barbar.lua +++ /dev/null @@ -1,3 +0,0 @@ -vim.api.nvim_set_keymap('n', '', ':BufferNext', { noremap = true, silent = true }) -vim.api.nvim_set_keymap('n', '', ':BufferPrevious', { noremap = true, silent = true }) -vim.api.nvim_set_keymap('n', '', ':BufferClose', { noremap = true, silent = true }) diff --git a/nvim/lua/pluginconfig/dashboard-nvim.lua b/nvim/lua/pluginconfig/dashboard-nvim.lua deleted file mode 100644 index e56a0c3..0000000 --- a/nvim/lua/pluginconfig/dashboard-nvim.lua +++ /dev/null @@ -1,63 +0,0 @@ ---[[ -local dashboard = { - custom_header = { -' _..._ ', -' .\' (_`. _ __ ___ ', -' : . : | | _ _ _ __ __ _ _ _\\ \\ / (_)_ __ ___ ', -' :) () : | | | | | | \'_ \\ / _` | \'__\\ \\ / /| | \'_ ` _ \\ ', -' `. . .\' | |__| |_| | | | | (_| | | \\ V / | | | | | | |', -' `-...-\' |_____\\__,_|_| |_|\\__,_|_| \\_/ |_|_| |_| |_|', - }, - footer= {'Laily'} -} -]] - -local dashboard = { - custom_header = { - '███╗ ██╗██╗ ██╗ ██████╗ ██████╗ ██████╗ ███████╗', - '████╗ ██║██║ ██║██╔════╝██╔═══██╗██╔══██╗██╔════╝', - '██╔██╗ ██║██║ ██║██║ ██║ ██║██║ ██║█████╗', - '██║╚██╗██║╚██╗ ██╔╝██║ ██║ ██║██║ ██║██╔══╝', - '██║ ╚████║ ╚████╔╝ ╚██████╗╚██████╔╝██████╔╝███████╗', - '╚═╝ ╚═══╝ ╚═══╝ ╚═════╝ ╚═════╝ ╚═════╝ ╚══════╝' - }, - footer= {'Laily'}, - } --- vim.g.dashboard_custom_header = { --- --- ' _..._ ', --- ' .\' `. ██  ██  ██ ███  ██  █████  ██████  ██  ██ ██ ███  ███ ', --- ' : : ██  ██  ██ ████  ██ ██   ██ ██   ██ ██  ██ ██ ████  ████ ', --- ' : : ██  ██  ██ ██ ██  ██ ███████ ██████  ██  ██ ██ ██ ████ ██ ', --- ' `. .\' ██  ██  ██ ██  ██ ██ ██   ██ ██   ██  ██  ██  ██ ██  ██  ██ ', --- ' `-...-\' ███████  ██████  ██   ████ ██  ██ ██  ██   ████   ██ ██      ██ ', --- --- } - -vim.g.dashboard_custom_header = dashboard.custom_header - -vim.g.dashboard_default_executive = 'telescope' - -vim.g.dashboard_custom_section = { - a = {description = {' Find File '}, command = 'Telescope find_files'}, - b = {description = {' Recently Used Files'}, command = 'Telescope oldfiles'}, - c = {description = {' Load Last Session '}, command = 'SessionLoad'}, - d = {description = {' Find Word '}, command = 'Telescope live_grep'}, - e = {description = {' Settings '}, command = ':e '..CONFIG_PATH..'/lv-settings.lua'} - -- e = {description = {' Marks '}, command = 'Telescope marks'} -} - --- file_browser = {description = {' File Browser'}, command = 'Telescope find_files'}, - --- vim.g.dashboard_custom_shortcut = { --- a = 'f', --- find_word = 'SPC f a', --- last_session = 'SPC s l', --- new_file = 'SPC c n', --- book_marks = 'SPC f b' --- } --- find_history = 'SPC f h', - --- vim.g.dashboard_session_directory = CACHE_PATH..'/session' -vim.g.dashboard_custom_footer = dashboard.footer - diff --git a/nvim/lua/pluginconfig/fzf-lua.lua b/nvim/lua/pluginconfig/fzf-lua.lua deleted file mode 100644 index d010bfa..0000000 --- a/nvim/lua/pluginconfig/fzf-lua.lua +++ /dev/null @@ -1,11 +0,0 @@ -require'fzf-lua'.setup { - fzf_opts = { ['--keep-right'] = ''}, - fzf_cli_args = '--keep-right', - --[[ - winopts = { - preview = { - layout = "vertical" - } - } - ]] -} \ No newline at end of file diff --git a/nvim/lua/pluginconfig/galaxyline.lua b/nvim/lua/pluginconfig/galaxyline.lua deleted file mode 100644 index f987f4a..0000000 --- a/nvim/lua/pluginconfig/galaxyline.lua +++ /dev/null @@ -1,220 +0,0 @@ -local gl = require('galaxyline') --- get my theme in galaxyline repo --- local colors = require('galaxyline.theme').default -local colors = { - -- bg = '#2E2E2E', - bg = '#292D38', - yellow = '#DCDCAA', - dark_yellow = '#D7BA7D', - cyan = '#4EC9B0', - green = '#608B4E', - light_green = '#B5CEA8', - string_orange = '#CE9178', - orange = '#FF8800', - purple = '#C586C0', - magenta = '#D16D9E', - grey = '#858585', - blue = '#569CD6', - vivid_blue = '#4FC1FF', - light_blue = '#9CDCFE', - red = '#D16969', - error_red = '#F44747', - info_yellow = '#FFCC66' -} -local condition = require('galaxyline.condition') -local gls = gl.section -gl.short_line_list = {'NvimTree', 'vista', 'dbui', 'packer'} - -table.insert(gls.left, { - ViMode = { - provider = function() - -- auto change color according the vim mode - local mode_color = { - n = colors.blue, - i = colors.green, - v = colors.purple, - [''] = colors.purple, - V = colors.purple, - c = colors.magenta, - no = colors.blue, - s = colors.orange, - S = colors.orange, - [''] = colors.orange, - ic = colors.yellow, - R = colors.red, - Rv = colors.red, - cv = colors.blue, - ce = colors.blue, - r = colors.cyan, - rm = colors.cyan, - ['r?'] = colors.cyan, - ['!'] = colors.blue, - t = colors.blue - } - vim.api.nvim_command('hi GalaxyViMode guifg=' .. mode_color[vim.fn.mode()]) - return '▊ ' - end, - highlight = {colors.red, colors.bg} - } -}) -print(vim.fn.getbufvar(0, 'ts')) -vim.fn.getbufvar(0, 'ts') - -table.insert(gls.left, { - GitIcon = { - provider = function() - return ' ' - end, - condition = condition.check_git_workspace, - separator = ' ', - separator_highlight = {'NONE', colors.bg}, - highlight = {colors.orange, colors.bg} - } -}) - -table.insert(gls.left, { - GitBranch = { - provider = 'GitBranch', - condition = condition.check_git_workspace, - separator = ' ', - separator_highlight = {'NONE', colors.bg}, - highlight = {colors.grey, colors.bg} - } -}) - -table.insert(gls.left, { - DiffAdd = { - provider = 'DiffAdd', - condition = condition.hide_in_width, - icon = '  ', - highlight = {colors.green, colors.bg} - } -}) -table.insert(gls.left, { - DiffModified = { - provider = 'DiffModified', - condition = condition.hide_in_width, - icon = ' 柳', - highlight = {colors.blue, colors.bg} - } -}) -table.insert(gls.left, { - DiffRemove = { - provider = 'DiffRemove', - condition = condition.hide_in_width, - icon = '  ', - highlight = {colors.red, colors.bg} - } -}) - -table.insert(gls.right, { - DiagnosticError = {provider = 'DiagnosticError', icon = '  ', highlight = {colors.error_red, colors.bg}} -}) -table.insert(gls.right, {DiagnosticWarn = {provider = 'DiagnosticWarn', icon = '  ', highlight = {colors.orange, colors.bg}}}) - -table.insert(gls.right, { - DiagnosticHint = {provider = 'DiagnosticHint', icon = '  ', highlight = {colors.vivid_blue, colors.bg}} -}) - -table.insert(gls.right, {DiagnosticInfo = {provider = 'DiagnosticInfo', icon = '  ', highlight = {colors.info_yellow, colors.bg}}}) - -table.insert(gls.right, { - TreesitterIcon = { - provider = function() - if next(vim.treesitter.highlighter.active) ~= nil then return ' ' end - return '' - end, - separator = ' ', - separator_highlight = {'NONE', colors.bg}, - highlight = {colors.green, colors.bg} - } -}) - -table.insert(gls.right, { - ShowLspClient = { - provider = 'GetLspClient', - condition = function() - local tbl = {['dashboard'] = true, [' '] = true} - if tbl[vim.bo.filetype] then return false end - return true - end, - icon = ' ', - highlight = {colors.grey, colors.bg} - } -}) - -table.insert(gls.right, { - LineInfo = { - provider = 'LineColumn', - separator = ' ', - separator_highlight = {'NONE', colors.bg}, - highlight = {colors.grey, colors.bg} - } -}) - -table.insert(gls.right, { - PerCent = { - provider = 'LinePercent', - separator = ' ', - separator_highlight = {'NONE', colors.bg}, - highlight = {colors.grey, colors.bg} - } -}) - -table.insert(gls.right, { - Tabstop = { - provider = function() - return "Spaces: " .. vim.api.nvim_buf_get_option(0, "shiftwidth") .. " " - end, - condition = condition.hide_in_width, - separator = ' ', - separator_highlight = {'NONE', colors.bg}, - highlight = {colors.grey, colors.bg} - } -}) - -table.insert(gls.right, { - BufferType = { - provider = 'FileTypeName', - condition = condition.hide_in_width, - separator = ' ', - separator_highlight = {'NONE', colors.bg}, - highlight = {colors.grey, colors.bg} - } -}) - -table.insert(gls.right, { - FileEncode = { - provider = 'FileEncode', - condition = condition.hide_in_width, - separator = ' ', - separator_highlight = {'NONE', colors.bg}, - highlight = {colors.grey, colors.bg} - } -}) - -table.insert(gls.right, { - Space = { - provider = function() - return ' ' - end, - separator = ' ', - separator_highlight = {'NONE', colors.bg}, - highlight = {colors.orange, colors.bg} - } -}) - -table.insert(gls.short_line_left, { - BufferType = { - provider = 'FileTypeName', - separator = ' ', - separator_highlight = {'NONE', colors.bg}, - highlight = {colors.grey, colors.bg} - } -}) - -table.insert(gls.short_line_left, { - SFileName = {provider = 'SFileName', condition = condition.buffer_not_empty, highlight = {colors.grey, colors.bg}} -}) - ---table.insert(gls.short_line_right[1] = {BufferIcon = {provider = 'BufferIcon', highlight = {colors.grey, colors.bg}}}) diff --git a/nvim/lua/pluginconfig/gitsigns.lua b/nvim/lua/pluginconfig/gitsigns.lua deleted file mode 100644 index 58a31d5..0000000 --- a/nvim/lua/pluginconfig/gitsigns.lua +++ /dev/null @@ -1,18 +0,0 @@ -require('gitsigns').setup { - signs = { - -- TODO add hl to colorscheme - add = {hl = 'GitSignsAdd' , text = '▎', numhl='GitSignsAddNr' , linehl='GitSignsAddLn'}, - change = {hl = 'GitSignsChange', text = '▎', numhl='GitSignsChangeNr', linehl='GitSignsChangeLn'}, - delete = {hl = 'GitSignsDelete', text = '契', numhl='GitSignsDeleteNr', linehl='GitSignsDeleteLn'}, - topdelete = {hl = 'GitSignsDelete', text = '契', numhl='GitSignsDeleteNr', linehl='GitSignsDeleteLn'}, - changedelete = {hl = 'GitSignsChange', text = '▎', numhl='GitSignsChangeNr', linehl='GitSignsChangeLn'}, - }, - numhl = false, - linehl = false, - watch_gitdir = { - interval = 1000 - }, - sign_priority = 6, - update_debounce = 200, - status_formatter = nil, -- Use default -} diff --git a/nvim/lua/pluginconfig/hop.lua b/nvim/lua/pluginconfig/hop.lua deleted file mode 100644 index acd4cd7..0000000 --- a/nvim/lua/pluginconfig/hop.lua +++ /dev/null @@ -1,2 +0,0 @@ -vim.api.nvim_set_keymap('n', 's', ":HopChar2", {silent = true}) -vim.api.nvim_set_keymap('n', 'S', ":HopWord", {silent = true}) diff --git a/nvim/lua/pluginconfig/init.lua b/nvim/lua/pluginconfig/init.lua deleted file mode 100644 index 2bdb7c6..0000000 --- a/nvim/lua/pluginconfig/init.lua +++ /dev/null @@ -1,39 +0,0 @@ --- source plugin config - -require('pluginconfig/barbar') -require('pluginconfig/dashboard-nvim') -require('pluginconfig/galaxyline') -require('pluginconfig/gitsigns') -require('pluginconfig/hop') -require('pluginconfig/mason') -require('pluginconfig/neodev') -- must before lspconfig -require('pluginconfig/mkdx') -require('pluginconfig/neotest') -require('pluginconfig/numb') -require('pluginconfig/nvim-autopairs') -require('pluginconfig/nvim-cmp') -require('pluginconfig/nvim-colorizer') -require('pluginconfig/nvim-lint') -require('pluginconfig/fzf-lua') -require('pluginconfig/nvim-tree') -- This plugin must be required somewhere before colorscheme. Placing it after will break navigation keymappings -require('pluginconfig/nvim-treesitter') -require('pluginconfig/rnvimr') -require('pluginconfig/symbols-outline') -require('pluginconfig/telescope') -require('pluginconfig/toggleterm') -require('pluginconfig/vim-matchup') -require('pluginconfig/which-key') - - --- nvim_comment -require('nvim_comment').setup() - --- lsp-rooter -require("lsp-rooter").setup { - -- your configuration comes here - -- or leave it empty to use the default settings - -- refer to the configuration section below -} - --- lsp signature -require("lsp_signature").setup() diff --git a/nvim/lua/pluginconfig/mason.lua b/nvim/lua/pluginconfig/mason.lua deleted file mode 100644 index 03646c3..0000000 --- a/nvim/lua/pluginconfig/mason.lua +++ /dev/null @@ -1 +0,0 @@ -require("mason").setup() \ No newline at end of file diff --git a/nvim/lua/pluginconfig/mkdx.lua b/nvim/lua/pluginconfig/mkdx.lua deleted file mode 100644 index 286705d..0000000 --- a/nvim/lua/pluginconfig/mkdx.lua +++ /dev/null @@ -1,7 +0,0 @@ -vim.cmd([[ -let g:mkdx#settings = { 'highlight': { 'enable': 1 }, - \ 'enter': { 'shift': 1 }, - \ 'links': { 'external': { 'enable': 1 } }, - \ 'toc': { 'text': 'Table of Contents', 'update_on_write': 1 }, - \ 'fold': { 'enable': 1 } } -]]) diff --git a/nvim/lua/pluginconfig/neodev.lua b/nvim/lua/pluginconfig/neodev.lua deleted file mode 100644 index e8a4d9e..0000000 --- a/nvim/lua/pluginconfig/neodev.lua +++ /dev/null @@ -1,3 +0,0 @@ -require("neodev").setup({ - -- add any options here, or leave empty to use the default settings -}) diff --git a/nvim/lua/pluginconfig/neotest.lua b/nvim/lua/pluginconfig/neotest.lua deleted file mode 100644 index 08515e3..0000000 --- a/nvim/lua/pluginconfig/neotest.lua +++ /dev/null @@ -1,10 +0,0 @@ -require("neotest").setup({ - adapters = { - require("neotest-go")({ - experimental = { - test_table = true, - }, - args = { "-gcflags=all=-l", "-count=1", "-timeout=60s" } - }) - } -}) diff --git a/nvim/lua/pluginconfig/numb.lua b/nvim/lua/pluginconfig/numb.lua deleted file mode 100644 index 415327f..0000000 --- a/nvim/lua/pluginconfig/numb.lua +++ /dev/null @@ -1,4 +0,0 @@ -require('numb').setup{ - show_numbers = true, -- Enable 'number' for the window while peeking - show_cursorline = true -- Enable 'cursorline' for the window while peeking -} diff --git a/nvim/lua/pluginconfig/nvim-autopairs.lua b/nvim/lua/pluginconfig/nvim-autopairs.lua deleted file mode 100644 index 8a26f13..0000000 --- a/nvim/lua/pluginconfig/nvim-autopairs.lua +++ /dev/null @@ -1,123 +0,0 @@ --- require('nvim-autopairs').setup() --- local npairs = require('nvim-autopairs') - --- local function imap(lhs, rhs, opts) --- local options = {noremap = false} --- if opts then options = vim.tbl_extend('force', options, opts) end --- vim.api.nvim_set_keymap('i', lhs, rhs, options) --- end - --- _G.MUtils = {} - --- -- TEST --- vim.g.completion_confirm_key = "" --- MUtils.completion_confirm = function() --- if vim.fn.pumvisible() ~= 0 then --- if vim.fn.complete_info()["selected"] ~= -1 then --- vim.fn["compe#confirm"]() --- -- return npairs.esc("") --- return npairs.esc("") --- else --- vim.defer_fn(function() --- vim.fn["compe#confirm"]("") --- end, 20) --- return npairs.esc("") --- end --- else --- return npairs.check_break_line_char() --- end --- end --- -- TEST - --- MUtils.completion_confirm = function() --- if vim.fn.pumvisible() ~= 0 then --- if vim.fn.complete_info()["selected"] ~= -1 then --- vim.fn["compe#confirm"]() --- return npairs.esc("") --- else --- vim.api.nvim_select_popupmenu_item(0, false, false, {}) --- vim.fn["compe#confirm"]() --- return npairs.esc("") --- end --- else --- return npairs.check_break_line_char() --- end --- end - --- MUtils.tab = function() --- if vim.fn.pumvisible() ~= 0 then --- return npairs.esc("") --- else --- if vim.fn["vsnip#available"](1) ~= 0 then --- vim.fn.feedkeys(string.format('%c%c%c(vsnip-expand-or-jump)', 0x80, 253, 83)) --- return npairs.esc("") --- else --- return npairs.esc("") --- end --- end --- end - --- MUtils.s_tab = function() --- if vim.fn.pumvisible() ~= 0 then --- return npairs.esc("") --- else --- if vim.fn["vsnip#jumpable"](-1) ~= 0 then --- vim.fn.feedkeys(string.format('%c%c%c(vsnip-jump-prev)', 0x80, 253, 83)) --- return npairs.esc("") --- else --- return npairs.esc("") --- end --- end --- end - --- -- Autocompletion and snippets --- vim.api.nvim_set_keymap('i', '', 'v:lua.MUtils.completion_confirm()', {expr = true, noremap = true}) --- -- imap("", "v:lua.MUtils.completion_confirm()", {expr = true, noremap = true}) --- imap("", "v:lua.MUtils.tab()", {expr = true, noremap = true}) --- imap("", "v:lua.MUtils.s_tab()", {expr = true, noremap = true}) - -local remap = vim.api.nvim_set_keymap -local npairs = require('nvim-autopairs') -local Rule = require('nvim-autopairs.rule') - --- skip it, if you use another global object -_G.MUtils= {} - -vim.g.completion_confirm_key = "" -MUtils.completion_confirm=function() - if vim.fn.pumvisible() ~= 0 then - if vim.fn.complete_info()["selected"] ~= -1 then - return vim.fn["compe#confirm"](npairs.esc("")) - else - return npairs.esc("") - end - else - return npairs.autopairs_cr() - end -end - - -remap('i' , '','v:lua.MUtils.completion_confirm()', {expr = true , noremap = true}) - -npairs.setup({ - check_ts = true, - ts_config = { - lua = {'string'},-- it will not add pair on that treesitter node - javascript = {'template_string'}, - java = false,-- don't check treesitter on java - } -}) - -require('nvim-treesitter.configs').setup { - autopairs = {enable = true} -} - -local ts_conds = require('nvim-autopairs.ts-conds') - --- press % => %% is only inside comment or string -npairs.add_rules({ - Rule("%", "%", "lua") - :with_pair(ts_conds.is_ts_node({'string','comment'})), - Rule("$", "$", "lua") - :with_pair(ts_conds.is_not_ts_node({'function'})) -}) diff --git a/nvim/lua/pluginconfig/nvim-cmp.lua b/nvim/lua/pluginconfig/nvim-cmp.lua deleted file mode 100644 index 57ba65c..0000000 --- a/nvim/lua/pluginconfig/nvim-cmp.lua +++ /dev/null @@ -1,92 +0,0 @@ -local lspkind = require('lspkind') -local cmp = require 'cmp' - -local function keymapping(cmp) - return { - -- 上一个 - [''] = cmp.mapping.select_prev_item(), - -- 下一个 - [''] = cmp.mapping.select_next_item(), - -- 出现补全 - [''] = cmp.mapping(cmp.mapping.complete(), { 'i', 'c' }), - -- 取消 - [''] = cmp.mapping({ - i = cmp.mapping.abort(), - c = cmp.mapping.close(), - }), - -- 确认 - -- Accept currently selected item. If none selected, `select` first item. - -- Set `select` to `false` to only confirm explicitly selected items. - [''] = cmp.mapping.confirm({ - select = true, - behavior = cmp.ConfirmBehavior.Replace - }), - -- [''] = cmp.config.disable, -- Specify `cmp.config.disable` if you want to remove the default `` mapping. - [''] = cmp.mapping(cmp.mapping.scroll_docs(-4), { 'i', 'c' }), - [''] = cmp.mapping(cmp.mapping.scroll_docs(4), { 'i', 'c' }), - } -end - -cmp.setup { - -- 指定 snippet 引擎 - snippet = { - expand = function(args) - -- For `vsnip` users. - vim.fn["vsnip#anonymous"](args.body) - - -- For `luasnip` users. - -- require('luasnip').lsp_expand(args.body) - - -- For `ultisnips` users. - -- vim.fn["UltiSnips#Anon"](args.body) - - -- For `snippy` users. - -- require'snippy'.expand_snippet(args.body) - end, - }, - -- 来源 - sources = cmp.config.sources({ - { name = 'nvim_lsp' }, - -- For vsnip users. - { name = 'vsnip' }, - -- For luasnip users. - -- { name = 'luasnip' }, - --For ultisnips users. - -- { name = 'ultisnips' }, - -- -- For snippy users. - -- { name = 'snippy' }, - }, { { name = 'buffer' }, - { name = 'path' } - }), - - -- 快捷键 - mapping = keymapping(cmp), - -- 使用lspkind-nvim显示类型图标 - formatting = { - format = lspkind.cmp_format({ - with_text = true, -- do not show text alongside icons - maxwidth = 50, -- prevent the popup from showing more than provided characters (e.g 50 will not show more than 50 characters) - before = function(entry, vim_item) - -- Source 显示提示来源 - vim_item.menu = "[" .. string.upper(entry.source.name) .. "]" - return vim_item - end - }) - }, -} - --- Use buffer source for `/`. -cmp.setup.cmdline('/', { - sources = { - { name = 'buffer' } - } -}) - --- Use cmdline & path source for ':'. -cmp.setup.cmdline(':', { - sources = cmp.config.sources({ - { name = 'path' } - }, { - { name = 'cmdline' } - }) -}) diff --git a/nvim/lua/pluginconfig/nvim-colorizer.lua b/nvim/lua/pluginconfig/nvim-colorizer.lua deleted file mode 100644 index ed8fd40..0000000 --- a/nvim/lua/pluginconfig/nvim-colorizer.lua +++ /dev/null @@ -1,13 +0,0 @@ -require'colorizer'.setup( - {'*';}, - { - RGB = true; -- #RGB hex codes - RRGGBB = true; -- #RRGGBB hex codes - RRGGBBAA = true; -- #RRGGBBAA hex codes - rgb_fn = true; -- CSS rgb() and rgba() functions - hsl_fn = true; -- CSS hsl() and hsla() functions - css = true; -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB - css_fn = true; -- Enable all CSS *functions*: rgb_fn, hsl_fn - }) - -- names = true; -- "Name" codes like Blue - diff --git a/nvim/lua/pluginconfig/nvim-lint.lua b/nvim/lua/pluginconfig/nvim-lint.lua deleted file mode 100644 index 69fbfe7..0000000 --- a/nvim/lua/pluginconfig/nvim-lint.lua +++ /dev/null @@ -1,20 +0,0 @@ -local lint_lib = require('lint') - -lint_lib.linters_by_ft = { - go = {'golangcilint'} -} - -local golangcilint = lint_lib.linters.golangcilint -golangcilint.args = { - 'run', - '--config', - '~/.dotfile/.golangci_strict.yml', - '--out-format', - 'json', -} - -vim.api.nvim_create_autocmd({ "BufWritePost" }, { -callback = function() - require("lint").try_lint() -end, -}) \ No newline at end of file diff --git a/nvim/lua/pluginconfig/nvim-tree.lua b/nvim/lua/pluginconfig/nvim-tree.lua deleted file mode 100644 index 55c5c62..0000000 --- a/nvim/lua/pluginconfig/nvim-tree.lua +++ /dev/null @@ -1,55 +0,0 @@ -local function my_on_attach(bufnr) - local api = require "nvim-tree.api" - - local function opts(desc) - return { desc = "nvim-tree: " .. desc, buffer = bufnr, noremap = true, silent = true, nowait = true } - end - - -- default mappings - api.config.mappings.default_on_attach(bufnr) - - -- custom mappings - vim.keymap.set('n', '', api.tree.change_root_to_parent, opts('Up')) - vim.keymap.set('n', '?', api.tree.toggle_help, opts('Help')) - vim.keymap.set('n', 'l', api.node.open.edit, opts('Edit')) - vim.keymap.set('n', 'h', api.node.navigate.parent_close, opts('Parent Close')) - vim.keymap.set('n', 's', api.node.open.horizontal, opts('Horizontal Split')) - vim.keymap.set('n', 'v', api.node.open.vertical, opts('Vertical Split')) -end - -require'nvim-tree'.setup { - on_attach = my_on_attach, - disable_netrw = true, - hijack_netrw = true, - --auto_close = false, - filters = { - dotfiles = false, - custom = {} - }, - git = { - enable = true, - ignore = false, - timeout = 500, - }, - update_focused_file = { - -- enables the feature - enable = true, - -- update the root directory of the tree to the one of the folder containing the file if the file is not under the current root directory - -- only relevant when `update_focused_file.enable` is true - update_cwd = false, - -- list of buffer names / filetypes that will not update the cwd if the file isn't found under the current root directory - -- only relevant when `update_focused_file.update_cwd` is true and `update_focused_file.enable` is true - ignore_list = {} - }, -} - -vim.g.nvim_tree_indent_markers = 1 -- "0 by default, this option shows indent markers when folders are open -vim.g.nvim_tree_auto_ignore_ft = 'startify' --empty by default, don't auto open tree on specific filetypes. - -vim.g.nvim_tree_icons = { - default = '', - symlink = '', - git = {unstaged = "", staged = "✓", unmerged = "", renamed = "➜", untracked = ""}, - folder = {default = "", open = "", empty = "", empty_open = "", symlink = ""} -} - diff --git a/nvim/lua/pluginconfig/nvim-treesitter.lua b/nvim/lua/pluginconfig/nvim-treesitter.lua deleted file mode 100644 index 0556751..0000000 --- a/nvim/lua/pluginconfig/nvim-treesitter.lua +++ /dev/null @@ -1,29 +0,0 @@ -local treesitter = { - ensure_installed = "all", - highlight = { enabled = true }, - playground = { enabled = true }, - rainbow = { enabled = false }, -} - -require 'nvim-treesitter.configs'.setup { - ensure_installed = treesitter.ensure_installed, -- one of "all", "maintained" (parsers with maintainers), or a list of languages - ignore_install = { "haskell", "markdown", "swift" }, - matchup = { - enable = true, -- mandatory, false will disable the whole extension - -- disable = { "c", "ruby" }, -- optional, list of language that will be disabled - }, - highlight = { - enable = true, -- false will disable the whole extension - disable = { "markdown" }, - }, - context_commentstring = { - enable = true, - config = { - css = '// %s' - } - }, - -- indent = {enable = true, disable = {"python", "html", "javascript"}}, - -- TODO seems to be broken - indent = { enable = { "javascriptreact" } }, - autotag = { enable = true }, -} diff --git a/nvim/lua/pluginconfig/rnvimr.lua b/nvim/lua/pluginconfig/rnvimr.lua deleted file mode 100644 index c1140a7..0000000 --- a/nvim/lua/pluginconfig/rnvimr.lua +++ /dev/null @@ -1,6 +0,0 @@ --- Make Ranger replace netrw and be the file explorer --- vim.g.rnvimr_ex_enable = 1 -vim.g.rnvimr_draw_border = 1 -vim.g.rnvimr_pick_enable = 1 -vim.g.rnvimr_bw_enable = 1 -vim.api.nvim_set_keymap('n', '-', ':RnvimrToggle', {noremap = true, silent = true}) diff --git a/nvim/lua/pluginconfig/symbols-outline.lua b/nvim/lua/pluginconfig/symbols-outline.lua deleted file mode 100644 index e491be1..0000000 --- a/nvim/lua/pluginconfig/symbols-outline.lua +++ /dev/null @@ -1 +0,0 @@ -require("symbols-outline").setup() \ No newline at end of file diff --git a/nvim/lua/pluginconfig/telescope.lua b/nvim/lua/pluginconfig/telescope.lua deleted file mode 100644 index ce39b63..0000000 --- a/nvim/lua/pluginconfig/telescope.lua +++ /dev/null @@ -1,81 +0,0 @@ -local actions = require('telescope.actions') -local trouble = require("trouble.providers.telescope") --- Global remapping ------------------------------- --- '--color=never', -require('telescope').setup { - defaults = { - --find_command = {'rg', '--no-heading', '--with-filename', '--line-number', '--column', '--smart-case'}, - vimgrep_arguments = { 'rg', '--color=never', '--no-heading', '--with-filename', '--line-number', '--column', '--smart-case' }, - -- prompt_prefix = " ", - prompt_prefix = " ", - selection_caret = " ", - entry_prefix = " ", - initial_mode = "insert", - -- initial_mode = "insert", - selection_strategy = "reset", - sorting_strategy = "descending", - layout_strategy = "horizontal", - layout_config= {horizontal = {mirror = false}, vertical = {mirror = false}, width = 0.75,prompt_position = "bottom", preview_cutoff = 120}, - file_sorter = require'telescope.sorters'.get_fzy_sorter, - file_ignore_patterns = {}, - generic_sorter = require'telescope.sorters'.get_generic_fuzzy_sorter, - -- shorten_path = true, - path_display = {shroten = 2}, - winblend = 0, - border = {}, - borderchars = {'─', '│', '─', '│', '╭', '╮', '╯', '╰'}, - color_devicons = true, - use_less = true, - set_env = {['COLORTERM'] = 'truecolor'}, -- default = nil, - file_previewer = require'telescope.previewers'.vim_buffer_cat.new, - grep_previewer = require'telescope.previewers'.vim_buffer_vimgrep.new, - qflist_previewer = require'telescope.previewers'.vim_buffer_qflist.new, - - -- Developer configurations: Not meant for general override - buffer_previewer_maker = require'telescope.previewers'.buffer_previewer_maker, - mappings = { - i = { - [""] = actions.close, - [""] = actions.close, - [""] = actions.move_selection_next, - [""] = actions.move_selection_previous, - [""] = trouble.open_with_trouble, - [""] = actions.smart_send_to_qflist + actions.open_qflist, - -- To disable a keymap, put [map] = false - -- So, to not map "", just put - -- [""] = false, - -- [""] = actions.close, - - -- Otherwise, just set the mapping to the function that you want it to be. - -- [""] = actions.select_horizontal, - - -- Add up multiple actions - [""] = actions.select_default + actions.center - - -- You can perform as many actions in a row as you like - -- [""] = actions.select_default + actions.center + my_cool_custom_action, - }, - n = { - [""] = actions.move_selection_next, - [""] = actions.move_selection_previous, - [""] = trouble.open_with_trouble, - [""] = actions.smart_send_to_qflist + actions.open_qflist - -- [""] = my_cool_custom_action, - } - } - }, - extensions = { - fzf = { - fuzzy = true, -- false will only do exact matching - override_generic_sorter = true, -- override the generic sorter - override_file_sorter = true, -- override the file sorter - case_mode = "smart_case", -- or "ignore_case" or "respect_case" - -- the default case_mode is "smart_case" - } - } -} - ---require('telescope').load_extension('fzf') -require'telescope'.load_extension('project') -require("telescope").load_extension "file_browser" diff --git a/nvim/lua/pluginconfig/toggleterm.lua b/nvim/lua/pluginconfig/toggleterm.lua deleted file mode 100644 index a6e4e6e..0000000 --- a/nvim/lua/pluginconfig/toggleterm.lua +++ /dev/null @@ -1,50 +0,0 @@ -require("toggleterm").setup { - -- size can be a number or function which is passed the current terminal - size = function(term) - if term.direction == "horizontal" then - return 15 - elseif term.direction == "vertical" then - return vim.o.columns * 0.4 - end - end, - open_mapping = [[]], - hide_numbers = true, -- hide the number column in toggleterm buffers - shade_filetypes = {}, - shade_terminals = true, - shading_factor = '1', -- the degree by which to darken to terminal colour, default: 1 for dark backgrounds, 3 for light - start_in_insert = true, - insert_mappings = true, -- whether or not the open mapping applies in insert mode - persist_size = true, - -- direction = 'vertical' | 'horizontal' | 'window' | 'float', - direction = 'float', - close_on_exit = true, -- close the terminal window when the process exits - shell = vim.o.shell, -- change the default shell - -- This field is only relevant if direction is set to 'float' - float_opts = { - -- The border key is *almost* the same as 'nvim_open_win' - -- see :h nvim_open_win for details on borders however - -- the 'curved' border is a custom border type - -- not natively supported but implemented in this plugin. - -- border = 'single' | 'double' | 'shadow' | 'curved' -- ... other options supported by win open - border = 'single', - -- width = , - -- height = , - winblend = 3, - highlights = { - border = "Normal", - background = "Normal", - } - } -} - --- function _G.set_terminal_keymaps() --- local opts = {noremap = true} --- vim.api.nvim_buf_set_keymap(0, 't', '', [[]], opts) --- vim.api.nvim_buf_set_keymap(0, 't', 'jk', [[]], opts) --- vim.api.nvim_buf_set_keymap(0, 't', '', [[h]], opts) --- vim.api.nvim_buf_set_keymap(0, 't', '', [[j]], opts) --- vim.api.nvim_buf_set_keymap(0, 't', '', [[k]], opts) --- vim.api.nvim_buf_set_keymap(0, 't', '', [[l]], opts) --- end - --- vim.cmd('autocmd! TermOpen term://* lua set_terminal_keymaps()') diff --git a/nvim/lua/pluginconfig/vim-matchup.lua b/nvim/lua/pluginconfig/vim-matchup.lua deleted file mode 100644 index 27b3f57..0000000 --- a/nvim/lua/pluginconfig/vim-matchup.lua +++ /dev/null @@ -1,2 +0,0 @@ -vim.g.matchup_matchparen_offscreen = {method = 'popup'} - diff --git a/nvim/lua/pluginconfig/which-key.lua b/nvim/lua/pluginconfig/which-key.lua deleted file mode 100644 index 5fb3ca5..0000000 --- a/nvim/lua/pluginconfig/which-key.lua +++ /dev/null @@ -1,250 +0,0 @@ -require("which-key").setup { - plugins = { - marks = true, -- shows a list of your marks on ' and ` - registers = true, -- shows your registers on " in NORMAL or in INSERT mode - -- the presets plugin, adds help for a bunch of default keybindings in Neovim - -- No actual key bindings are created - presets = { - operators = false, -- adds help for operators like d, y, ... - motions = false, -- adds help for motions - text_objects = false, -- help for text objects triggered after entering an operator - windows = true, -- default bindings on - nav = true, -- misc bindings to work with windows - z = true, -- bindings for folds, spelling and others prefixed with z - g = true -- bindings for prefixed with g - } - }, - icons = { - breadcrumb = "»", -- symbol used in the command line area that shows your active key combo - separator = "➜", -- symbol used between a key and it's label - group = "+" -- symbol prepended to a group - }, - window = { - border = "single", -- none, single, double, shadow - position = "bottom", -- bottom, top - margin = { 1, 0, 1, 0 }, -- extra window margin [top, right, bottom, left] - padding = { 2, 2, 2, 2 } -- extra window padding [top, right, bottom, left] - }, - layout = { - height = { min = 4, max = 25 }, -- min and max height of the columns - width = { min = 20, max = 50 }, -- min and max width of the columns - spacing = 3 -- spacing between columns - }, - hidden = { "", "", "", "", "call", "lua", "^:", "^ " }, -- hide mapping boilerplate - show_help = true -- show help message on the command line when the popup is visible -} - -local opts = { - mode = "n", -- NORMAL mode - prefix = "", - buffer = nil, -- Global mappings. Specify a buffer number for buffer local mappings - silent = true, -- use `silent` when creating keymaps - noremap = true, -- use `noremap` when creating keymaps - nowait = false -- use `nowait` when creating keymaps -} - --- Set leader -vim.api.nvim_set_keymap('n', '', '', { noremap = true, silent = true }) -vim.g.mapleader = ' ' - --- no hl -vim.api.nvim_set_keymap('n', 'h', ':set hlsearch!', { noremap = true, silent = true }) - --- explorer -vim.api.nvim_set_keymap('n', 'e', ':NvimTreeToggle', { noremap = true, silent = true }) - --- telescope ---vim.api.nvim_set_keymap('n', '', ":lua require 'telescope'.extensions.file_browser.file_browser()", {noremap = true, silent = true}) --- vim.api.nvim_set_keymap('n', '', ":lua require'telescope.builtin'.find_files()", {noremap = true, silent = true}) -vim.api.nvim_set_keymap('n', '', ":FzfLua files", { noremap = true, silent = true }) - --- dashboard -vim.api.nvim_set_keymap('n', ';', ':Dashboard', { noremap = true, silent = true }) - --- Comments -vim.api.nvim_set_keymap("n", "b/", ":CommentToggle", { noremap = true, silent = true }) -vim.api.nvim_set_keymap("v", "b/", ":CommentToggle", { noremap = true, silent = true }) - --- close buffer -vim.api.nvim_set_keymap("n", "c", ":BufferClose", { noremap = true, silent = true }) - --- open projects ---vim.api.nvim_set_keymap('n', 'p', ":lua require'telescope'.extensions.project.project{}", {noremap = true, silent = true}) --- vim.api.nvim_set_keymap('n', 'p', ":lua require 'telescope'.extensions.file_browser.file_browser()", {noremap = true, silent = true}) --- TODO create entire treesitter section - -local mappings = { - -- ["/"] = "Comment", - -- ["c"] = "Close Buffer", - ["e"] = "Explorer", - -- ["f"] = "Find File", - ["h"] = "No Highlight", - a = { - name = "+Action", - a = { "@:", "execute last command again" } - }, - b = { - name = "+Buffer", - n = { "BufferNext", "next buffer" }, - p = { "BufferPrevious", "previous buffer" }, - q = { "q", "quit" }, - s = { "w", "save" }, - r = { "e!", "reload" }, - d = { "BufferClose", "close buffer" }, - z = { "CommentToggle", "toggle comment" }, - }, - D = { - name = "+Diagnostics", - t = { "TroubleToggle", "trouble" }, - w = { "TroubleToggle lsp_workspace_diagnostics", "workspace" }, - d = { "TroubleToggle lsp_document_diagnostics", "document" }, - q = { "TroubleToggle quickfix", "quickfix" }, - l = { "TroubleToggle loclist", "loclist" }, - r = { "TroubleToggle lsp_references", "references" }, - }, - d = { - name = "+Debug", - -- b = {"DebugToggleBreakpoint", "Toggle Breakpoint"}, - -- c = {"DebugContinue", "Continue"}, - -- i = {"DebugStepInto", "Step Into"}, - -- o = {"DebugStepOver", "Step Over"}, - -- r = {"DebugToggleRepl", "Toggle Repl"}, - -- s = {"DebugStart", "Start"} - d = { "lua vim.lsp.diagnostic.show_line_diagnostics()", "show diagnostics" }, - - c = { "lua require'dap'.continue()", "continue" }, - b = { ':lua require"dap".toggle_breakpoint()', "Toggle Breadpoint" }, - j = { ':lua require"dap".step_over()', "step over" }, - k = { ':lua require"dap".step_out()', "step out" }, - l = { ':lua require"dap".step_into()', "step into" }, - --', ':lua require"dap".continue()') - u = { ':lua require"dap".up()', "up" }, - -- d = {':lua require"dap".down()', "down"}, - _ = { ':lua require"dap".disconnect();require"dap".stop();require"dap".run_last()', "disconnect" }, - --r = {':lua require"dap".repl.open({}, "vsplit")l', "repl open"}, - i = { ':lua require"dap.ui.variables".visual_hover()', "visual_hover" }, - --? = {':lua require"dap.ui.variables".scopes()',"scopes"}, - -- e = {':lua require"dap".set_exception_breakpoints({"all"})',"esception bp"}, - -- a = {':lua require"debugHelper".attach()',"attach"}, - -- A = {':lua require"debugHelper".attachToRemote()',"attach to remote"}, - s = { ':lua local widgets=require"dap.ui.widgets";widgets.centered_float(widgets.scopes)', "centered_float" }, - }, - f = { - name = "+File", - m = { "lua require'utils'.open_md()", "open a markdown file in vscode" }, - s = { "w", "save file" }, - t = { "NvimTreeToggle", "toggle nvim tree" }, - r = { "RnvimrToggle", "toggle rnvimr" }, - y = { "lua require'utils'.yank_filepath()", "copy the file path" }, - d = { "lua require'utils'.yank_file_dir()", "copy the file path" }, - l = { "NvimTreeFindFile", "find file" }, - -- T = {"let @+ = 'go test -v -run='+expand('')", "get current word in go test"}, - }, - g = { - name = "+Git", - m = {"Gvdiff master:%", "Diff with master"}, - j = { "lua require 'gitsigns'.next_hunk()", "Next Hunk" }, - k = { "lua require 'gitsigns'.prev_hunk()", "Prev Hunk" }, - l = { "lua require 'gitsigns'.blame_line()", "Blame" }, - p = { "lua require 'gitsigns'.preview_hunk()", "Preview Hunk" }, - r = { "lua require 'gitsigns'.reset_hunk()", "Reset Hunk" }, - R = { "lua require 'gitsigns'.reset_buffer()", "Reset Buffer" }, - s = { "lua require 'gitsigns'.stage_hunk()", "Stage Hunk" }, - S = { "lua require 'gitsigns'.stage_buffer()", "Stage Buffer" }, - u = { - "lua require 'gitsigns'.undo_stage_hunk()", - "Undo Stage Hunk", - }, - o = { "Telescope git_status", "Open changed file" }, - b = { "Telescope git_branches", "Checkout branch" }, - c = { "Telescope git_commits", "Checkout commit" }, - C = { - "Telescope git_bcommits", - "Checkout commit(for current file)", - }, - d = { - "Gitsigns diffthis HEAD", - "Git Diff", - }, - }, - l = { - name = "+Language", - a = { "Lspsaga code_action", "Code Action" }, - A = { "Lspsaga range_code_action", "Selected Action" }, - d = { "Telescope lsp_document_diagnostics", "Document Diagnostics" }, - D = { "Telescope lsp_workspace_diagnostics", "Workspace Diagnostics" }, - f = { "LspFormatting", "Format" }, - F = { "Lspsaga lsp_finder", "LSP Finder" }, - -- i = {"Telescope lsp_implementations", "implement"}, - i = { "lua vim.lsp.buf.implementation()", "implement" }, - l = { "lua vim.lsp.buf.hover()", "hover" }, - L = { "Lspsaga show_line_diagnostics", "Line Diagnostics" }, - k = { ": LspRestart", "restart lsp server" }, - n = { "lua vim.lsp.diagnostic.goto_next()", "next diagnostic" }, - o = { ": SymbolsOutline", "symbols outline" }, - p = { "lua vim.lsp.diagnostic.goto_prev()", "prev diagnostic" }, - P = { "Lspsaga preview_definition", "Preview Definition" }, - q = { "Telescope quickfix", "Quickfix" }, - r = { "lua vim.lsp.buf.references()", "references" }, - R = { "Lspsaga rename", "Rename" }, - t = { "LspTypeDefinition", "Type Definition" }, - x = { "cclose", "Close Quickfix" }, - s = { "Telescope lsp_document_symbols", "Document Symbols" }, - S = { "Telescope lsp_dynamic_workspace_symbols", "Workspace Symbols" }, - z = { "LspInfo", "Info" }, - [","] = { "LspInstallInfo", "LSP servers" } - }, - p = { - name = "Packer", - c = { "PackerCompile", "Compile" }, - i = { "PackerInstall", "Install" }, - s = { "PackerSync", "Sync" }, - S = { "PackerStatus", "Status" }, - u = { "PackerUpdate", "Update" }, - }, - q = { - name = "quit", - q = { "qall", "quit" }, - }, - s = { - name = "+Search", - b = { "Telescope git_branches", "Checkout branch" }, - -- c = {"Telescope colorscheme", "Colorscheme"}, - c = { ":nohl", "no highlight" }, - d = { "Telescope lsp_document_diagnostics", "Document Diagnostics" }, - D = { "Telescope lsp_workspace_diagnostics", "Workspace Diagnostics" }, - f = { "Fzflua files", "Find File" }, - m = { "Telescope marks", "Marks" }, - M = { "Telescope man_pages", "Man Pages" }, - r = { "FzfLua oldfiles", "Open Recent File" }, - R = { "Telescope registers", "Registers" }, - t = { "FzfLua live_grep", "Text" }, - ["#"] = { "FzfLua grep_cword", "Search word under cursor" }, - }, - S = { - name = "+Session", - s = { "SessionSave", "Save Session" }, - l = { "SessionLoad", "Load Session" }, - }, - t = { - name = "+Test", - a = { "TestSuite -v -cover", "TestSuite" }, - t = { "lua require('neotest').run.run() ", "TestNearest" }, - f = { 'lua require("neotest").run.run(vim.fn.expand("%"))', "TestFile" }, - c = { "GoCover", "go coverage" }, - C = { "GoCoverClear", "go coverage clear" }, - b = { "lua require'dap'.toggle_breakpoint()", "set break point" }, - r = { "lua require'dap'.continue()", "continue" }, - }, - - -- extras - z = { - name = "+Zen", - s = { "TZBottom", "toggle status line" }, - t = { "TZTop", "toggle tab bar" }, - z = { "TZAtaraxis", "toggle zen" }, - } -} - -local wk = require("which-key") -wk.register(mappings, opts) diff --git a/nvim/lua/plugins/barbar.lua b/nvim/lua/plugins/barbar.lua index 367c46e..7d6fbe0 100644 --- a/nvim/lua/plugins/barbar.lua +++ b/nvim/lua/plugins/barbar.lua @@ -1,5 +1,6 @@ return { { + -- tabline 'romgrk/barbar.nvim', dependencies = { 'lewis6991/gitsigns.nvim', -- OPTIONAL: for git status diff --git a/nvim/lua/plugins/conform.lua b/nvim/lua/plugins/conform.lua index 2641c29..8429b8f 100644 --- a/nvim/lua/plugins/conform.lua +++ b/nvim/lua/plugins/conform.lua @@ -1,4 +1,5 @@ return { + -- for format { "stevearc/conform.nvim", opts = { diff --git a/nvim/lua/plugins/nvim-cmp.lua b/nvim/lua/plugins/nvim-cmp.lua index 9962806..0f3a4e9 100644 --- a/nvim/lua/plugins/nvim-cmp.lua +++ b/nvim/lua/plugins/nvim-cmp.lua @@ -76,7 +76,8 @@ end return { { "nvim-cmp", - dependencies = { + enable = false, + dependencies = { "hrsh7th/cmp-emoji", 'hrsh7th/vim-vsnip', 'hrsh7th/vim-vsnip-integ',