From 3d7ad2c0dde72b2eb8741624409569eab5698185 Mon Sep 17 00:00:00 2001 From: abs3nt Date: Wed, 8 Mar 2023 12:06:54 -0800 Subject: [PATCH] updates --- init.lua | 2 +- lua/mappings.lua | 19 ++++++++++++++++--- lua/options.lua | 3 +++ lua/plugins.lua | 37 ------------------------------------- 4 files changed, 20 insertions(+), 41 deletions(-) diff --git a/init.lua b/init.lua index ec20438..dd3a308 100644 --- a/init.lua +++ b/init.lua @@ -11,8 +11,8 @@ if not vim.loop.fs_stat(lazypath) then end vim.opt.rtp:prepend(lazypath) -require('mappings') require('options') require('lazy').setup('plugins') +require('mappings') require('lsp_settings') require('autocmds') diff --git a/lua/mappings.lua b/lua/mappings.lua index 1a86288..c541e2b 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -1,8 +1,5 @@ local vimp = require('vimp') --- Map leader -vim.g.mapleader = " " - -- tabs and stuff vimp.vnoremap("", [[]]) vimp.noremap("", [[>gv]]) @@ -30,3 +27,19 @@ vimp.nnoremap({ 'silent' }, 'l', function() vim.b.lnstatus = "number" end end) + +-- plugins +vimp.noremap('md', [[:MarkdownProggle]]) + +vimp.nnoremap({ 'silent' }, '', [[:BufferNext]]) +vimp.nnoremap({ 'silent' }, '', [[:BufferPrevious]]) + + +vimp.nnoremap({ 'silent' }, 'a', [[:ArgWrap]]) + + +vimp.noremap({ 'silent' }, 'n', [[:NvimTreeToggle]]) + +vimp.noremap({ 'silent' }, 'ff', [[:Telescope find_files]]) +vimp.noremap({ 'silent' }, 'fg', [[:Telescope live_grep]]) +vimp.noremap({ 'silent' }, 'fb', [[:Telescope buffers]]) diff --git a/lua/options.lua b/lua/options.lua index 156222c..775d312 100644 --- a/lua/options.lua +++ b/lua/options.lua @@ -1,3 +1,6 @@ +-- Map leader +vim.g.mapleader = " " + -- colors vim.o.termguicolors = true diff --git a/lua/plugins.lua b/lua/plugins.lua index 26060bb..9ebbcd3 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -1,4 +1,3 @@ -local vimp = require('vimp') return { -- https://github.com/tpope/vim-obsession @@ -17,7 +16,6 @@ return { vim.fn["mkdp#util#install"]() end, config = function() - vimp.noremap('md', [[:MarkdownPreviewToggle]]) vim.g.mkdp_filetypes = { "markdown" } vim.g.mkdp_markdown_css = os.getenv("XDG_CONFIG_HOME") .. '/nvim/static/custom.css' vim.g.mkdp_highlight_css = os.getenv("XDG_CACHE_HOME") .. '/wal/colors.css' @@ -27,29 +25,6 @@ return { ft = { "markdown" } }, - { - 'ThePrimeagen/harpoon', - dependencies = { - 'nvim-lua/plenary.nvim' - }, - config = function() - require("harpoon").setup({ - -- sets the marks upon calling `toggle` on the ui, instead of require `:w`. - save_on_toggle = false, - -- saves the harpoon file upon every change. disabling is unrecommended. - save_on_change = true, - -- sets harpoon to run the command immediately as it's passed to the terminal when calling `sendCommand`. - enter_on_sendcmd = false, - -- closes any tmux windows harpoon that harpoon creates when you close Neovim. - tmux_autoclose_windows = false, - -- filetypes that you want to prevent from adding to the harpoon list menu. - excluded_filetypes = { "harpoon" }, - -- set marks specific to each git branch inside git repository - mark_branch = false, - }) - end - }, - { 'ray-x/web-tools.nvim', config = function() @@ -154,18 +129,11 @@ return { lazy = true }, }, - config = function() - require("telescope").load_extension('harpoon') - vimp.noremap({ 'silent' }, 'ff', [[:Telescope find_files]]) - vimp.noremap({ 'silent' }, 'fg', [[:Telescope live_grep]]) - vimp.noremap({ 'silent' }, 'fb', [[:Telescope buffers]]) - end }, -- https://github.com/nvim-tree/nvim-tree.lua { 'nvim-tree/nvim-tree.lua', - vimp.noremap({ 'silent' }, 'n', [[:NvimTreeToggle]]), dependencies = { 'nvim-tree/nvim-web-devicons' }, @@ -214,9 +182,6 @@ return { -- https://github.com/FooSoft/vim-argwrap { 'FooSoft/vim-argwrap', - config = function() - vimp.nnoremap({ 'silent' }, 'a', [[:ArgWrap]]) - end }, -- https://github.com/kylechui/nvim-surround @@ -378,8 +343,6 @@ return { 'romgrk/barbar.nvim', dependencies = 'nvim-tree/nvim-web-devicons', config = function() - vimp.nnoremap({ 'silent' }, '', [[:BufferNext]]) - vimp.nnoremap({ 'silent' }, '', [[:BufferPrevious]]) require 'bufferline'.setup { animation = true, closable = true,