diff --git a/nvim/init.lua b/nvim/init.lua index 3aea20f..82d64bf 100644 --- a/nvim/init.lua +++ b/nvim/init.lua @@ -1,4 +1,21 @@ -require ('packer-plugins') -require ('globals') -require ('general-options') -require ('keyboard-shortcuts') +require('globals') +require('general-options') +require('keyboard-shortcuts') +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" +if not (vim.uv or vim.loop).fs_stat(lazypath) then + vim.fn.system({ + "git", + "clone", + "--filter=blob:none", + "https://github.com/folke/lazy.nvim.git", + "--branch=stable", -- latest stable release + lazypath, + }) +end +vim.opt.rtp:prepend(lazypath) + +-- Example using a list of specs with the default options +vim.g.mapleader = " " -- Make sure to set `mapleader` before lazy so your mappings are correct +vim.g.maplocalleader = "\\" -- Same for `maplocalleader` + +require("lazy").setup("plugins") diff --git a/nvim/lazy-lock.json b/nvim/lazy-lock.json new file mode 100644 index 0000000..6f511d7 --- /dev/null +++ b/nvim/lazy-lock.json @@ -0,0 +1,39 @@ +{ + "LazyVim": { "branch": "main", "commit": "4b1d39762773f60f35e73c32596610e360113a6a" }, + "LuaSnip": { "branch": "master", "commit": "50fcf17db7c75af80e6b6109acfbfb4504768780" }, + "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, + "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, + "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, + "friendly-snippets": { "branch": "main", "commit": "700c4a25caacbb4648c9a27972c2fe203948e0c2" }, + "git-worktree.nvim": { "branch": "master", "commit": "f247308e68dab9f1133759b05d944569ad054546" }, + "gruvbox.nvim": { "branch": "main", "commit": "d4cde3853a172485961b515c36d51d757728d6e6" }, + "harpoon": { "branch": "harpoon2", "commit": "0378a6c428a0bed6a2781d459d7943843f374bce" }, + "lazy.nvim": { "branch": "main", "commit": "c501b429cf995c645454539b924aaefae45bb9eb" }, + "lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "8db12610bcb7ce67013cfdfaba4dd47a23c6e851" }, + "mason.nvim": { "branch": "main", "commit": "0950b15060067f752fde13a779a994f59516ce3d" }, + "mini.ai": { "branch": "main", "commit": "a7e90f110e6274262616311b93cef12cd2667a2d" }, + "mini.pairs": { "branch": "main", "commit": "40261dfcec7623cd57be3c3beb50fa73f2650cdf" }, + "nerdtree": { "branch": "master", "commit": "fbb71fcd90602e3ec77f40b864b5f9b437c496c5" }, + "nerdtree-git-plugin": { "branch": "master", "commit": "e1fe727127a813095854a5b063c15e955a77eafb" }, + "nvim-cmp": { "branch": "main", "commit": "a110e12d0b58eefcf5b771f533fc2cf3050680ac" }, + "nvim-lspconfig": { "branch": "master", "commit": "4d38bece98300e3e5cd24a9aa0d0ebfea4951c16" }, + "nvim-send-to-term": { "branch": "master", "commit": "e0aa448d417a553d19cba8c78d91993387f1ff2d" }, + "nvim-snippets": { "branch": "main", "commit": "5c978b3ba0c504dc9f94ca93d17029f26064d229" }, + "nvim-treesitter": { "branch": "master", "commit": "b47dde81a0a4b9b62e9a73a71ff0df2202323dd9" }, + "nvim-web-devicons": { "branch": "master", "commit": "c0cfc1738361b5da1cd0a962dd6f774cc444f856" }, + "oil.nvim": { "branch": "master", "commit": "18272aba9d00a3176a5443d50dbb4464acc167bd" }, + "plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" }, + "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, + "telescope.nvim": { "branch": "0.1.x", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" }, + "undotree": { "branch": "master", "commit": "56c684a805fe948936cda0d1b19505b84ad7e065" }, + "vim-devicons": { "branch": "master", "commit": "71f239af28b7214eebb60d4ea5bd040291fb7e33" }, + "vim-fugitive": { "branch": "master", "commit": "4f59455d2388e113bd510e85b310d15b9228ca0d" }, + "vim-grepper": { "branch": "master", "commit": "485d349125d46f2788833ecb43df7a14c46706f6" }, + "vim-repeat": { "branch": "master", "commit": "24afe922e6a05891756ecf331f39a1f6743d3d5a" }, + "vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" }, + "vim-system-copy": { "branch": "master", "commit": "8abd9ed21016bdc21b458c79da3b9ac0ee25c1ce" }, + "vim-unimpaired": { "branch": "master", "commit": "6d44a6dc2ec34607c41ec78acf81657248580bf1" }, + "zen-mode.nvim": { "branch": "main", "commit": "78557d972b4bfbb7488e17b5703d25164ae64e6a" } +} \ No newline at end of file diff --git a/nvim/lazyvim.json b/nvim/lazyvim.json new file mode 100644 index 0000000..b1aed37 --- /dev/null +++ b/nvim/lazyvim.json @@ -0,0 +1,9 @@ +{ + "extras": [ + + ], + "news": { + "NEWS.md": "6077" + }, + "version": 6 +} \ No newline at end of file diff --git a/nvim/lua/general-options.lua b/nvim/lua/general-options.lua index 549062a..ccfea6e 100644 --- a/nvim/lua/general-options.lua +++ b/nvim/lua/general-options.lua @@ -1,10 +1,12 @@ vim.g.mapleader = " " vim.keymap.set('i', 'jk', '') +local opt = vim.opt + -- number settings -vim.o.number = true -vim.o.relativenumber = true -vim.o.numberwidth = 3 +opt.number = true +opt.relativenumber = true +opt.numberwidth = 3 vim.cmd [[ :augroup numbertoggle : autocmd! @@ -13,38 +15,39 @@ vim.cmd [[ :augroup END ]] -vim.o.mouse = 'a' -vim.o.background = "dark" -vim.o.colorcolumn = "80" -vim.o.cursorcolumn = true -vim.o.gfn = "Fira Code:h14" -vim.o.cursorline = true -vim.o.directory = "$HOME/vimfiles/swp/" -vim.o.hidden = true -vim.o.ignorecase = true +opt.mouse = 'a' +opt.background = "dark" +opt.colorcolumn = "80" +opt.cursorcolumn = true +opt.gfn = "Fira Code:14" +-- opt.gfn = "FiraCode Nerd Font:h14" +opt.cursorline = true +opt.directory = "$HOME/vimfiles/swp/" +opt.hidden = true +opt.ignorecase = true -- show in split window when replacing -vim.o.inccommand = "split" -vim.o.updatetime = 100 +opt.inccommand = "split" +opt.updatetime = 100 -- show list chars vim.opt.list = true vim.opt.listchars = { eol = '¶', tab = '>-', trail = '~', extends = '>', precedes = '<' } -vim.o.backup = false -vim.o.swapfile = false -vim.o.scrolloff = 3 -vim.o.shiftround = true -vim.o.shiftwidth = 2 -vim.o.showmatch = true -vim.o.showtabline = 1 -vim.o.sidescrolloff = 5 -vim.o.smartcase = true -- case instance search -vim.o.smartindent = true -vim.o.splitbelow = true -vim.o.splitright = true -vim.o.undofile = true -vim.o.undodir = vim.fn.expand('~/vimfiles/undodir') -vim.o.wildmenu = true +opt.backup = false +opt.swapfile = false +opt.scrolloff = 3 +opt.shiftround = true +opt.shiftwidth = 2 +opt.showmatch = true +opt.showtabline = 1 +opt.sidescrolloff = 5 +opt.smartcase = true -- case instance search +opt.smartindent = true +opt.splitbelow = true +opt.splitright = true +opt.undofile = true +opt.undodir = vim.fn.expand('~/vimfiles/undodir') +opt.wildmenu = true vim.cmd [[ augroup vimrc-incsearch-highlight autocmd! @@ -65,16 +68,16 @@ autocmd('TextYankPost', { callback = function() vim.highlight.on_yank({ higroup = 'IncSearch', - timeout = 400, + timeout = 450, }) end, }) -vim.o.incsearch = true --- vim.o.hlsearch = true -vim.o.tabstop = 2 -vim.o.softtabstop = 2 +opt.incsearch = true +-- opt.hlsearch = true +opt.tabstop = 2 +opt.softtabstop = 2 vim.cmd [[ filetype plugin on diff --git a/nvim/lua/keyboard-shortcuts.lua b/nvim/lua/keyboard-shortcuts.lua index 37cbbc5..09b3241 100644 --- a/nvim/lua/keyboard-shortcuts.lua +++ b/nvim/lua/keyboard-shortcuts.lua @@ -23,13 +23,4 @@ vim.keymap.set('t', '', '') -- vim.keymap.set('n', '', ':so $MYVIMRC') nmap('', ':so %') nmap('w', ':up') -nmap('', ':FZF') -nmap('b', ':Buffers') - - -local stackmap = require("stackmap") -stackmap.push("lua_test", "n", { - ["t"] = "PlenaryTestFile" -}) - --- stackmap.pop("lua_test") +nmap('b', ':Buffers') \ No newline at end of file diff --git a/nvim/plugin/vim-system-copy-settings.vim b/nvim/lua/plugins/christoomey-standard.lua similarity index 55% rename from nvim/plugin/vim-system-copy-settings.vim rename to nvim/lua/plugins/christoomey-standard.lua index ac60d4e..7ed07e6 100644 --- a/nvim/plugin/vim-system-copy-settings.vim +++ b/nvim/lua/plugins/christoomey-standard.lua @@ -1,4 +1,13 @@ -if has('Win64') +return { + 'christoomey/vim-system-copy', + config = function() + vim.cmd( + [[ +if has('Win64') let g:system_copy#copy_command='clip' let g:system_copy#paste_command='powershell.exe -NoLogo -NoProfile -Noninteractive -Command "Get-Clipboard"' endif + ]] + ) + end +} diff --git a/nvim/lua/plugins/colorscheme.lua b/nvim/lua/plugins/colorscheme.lua new file mode 100644 index 0000000..e549af9 --- /dev/null +++ b/nvim/lua/plugins/colorscheme.lua @@ -0,0 +1,12 @@ +return { + -- add gruvbox + { "ellisonleao/gruvbox.nvim" }, + + -- Configure LazyVim to load gruvbox + { + "LazyVim/LazyVim", + opts = { + colorscheme = "gruvbox", + }, + } +} \ No newline at end of file diff --git a/nvim/lua/plugins/fugitive.lua b/nvim/lua/plugins/fugitive.lua new file mode 100644 index 0000000..81b822c --- /dev/null +++ b/nvim/lua/plugins/fugitive.lua @@ -0,0 +1,14 @@ +return { + 'tpope/vim-fugitive', + config = function () + vim.keymap.set('n', 'gs', ':Git') + vim.keymap.set('n', 'gps', ':Git push') + vim.keymap.set('n', 'gpl', ':Git pull') + vim.keymap.set('n', 'gpf', ':Git fetch') + vim.keymap.set('n', 'gbl', ':Git blame') + -- vim.keymap.set('n', 'gpr', ':Git rebase') + -- vim.keymap.set('n', 'gdu', 'diffget //2') + -- vim.keymap.set('n', 'gdi', 'diffget //3') + end, + +} diff --git a/nvim/lua/plugins/git-worktree.lua b/nvim/lua/plugins/git-worktree.lua new file mode 100644 index 0000000..d475ec3 --- /dev/null +++ b/nvim/lua/plugins/git-worktree.lua @@ -0,0 +1,12 @@ +return { + "ThePrimeagen/git-worktree.nvim", + dependencies = { + 'nvim-telescope/telescope.nvim', + }, + config = function() + require("git-worktree").setup({}) + require("telescope").load_extension("git_worktree") + vim.keymap.set('n', 'gws', ':Telescope git_worktree git_worktrees') + vim.keymap.set('n', 'gwc', ':Telescope git_worktree create_git_worktree') + end +} diff --git a/nvim/lua/plugins/harpoon.lua b/nvim/lua/plugins/harpoon.lua new file mode 100644 index 0000000..7cf8c3a --- /dev/null +++ b/nvim/lua/plugins/harpoon.lua @@ -0,0 +1,40 @@ +return { + 'ThePrimeagen/harpoon', + branch = "harpoon2", + dependencies = { { 'nvim-lua/plenary.nvim' } }, + config = function() + local harpoon = require('harpoon') + + harpoon:setup({}) + + -- basic telescope configuration + local conf = require("telescope.config").values + local function toggle_telescope(harpoon_files) + local file_paths = {} + for _, item in ipairs(harpoon_files.items) do + table.insert(file_paths, item.value) + end + + require("telescope.pickers").new({}, { + prompt_title = "Harpoon", + finder = require("telescope.finders").new_table({ + results = file_paths, + }), + previewer = conf.file_previewer({}), + sorter = conf.generic_sorter({}), + }):find() + end + + vim.keymap.set("n", "", function() toggle_telescope(harpoon:list()) end, + { desc = "Open harpoon window" }) + -- -- These functions are stored in harpoon. A plugn that I am developing + vim.keymap.set("n", "a", function() harpoon:list():add() end) + -- vim.keymap.set('n', "", function() require("harpoon.ui").toggle_quick_menu() end, silent) + vim.keymap.set("n", "hm", function() harpoon.ui:toggle_quick_menu(harpoon:list()) end) + -- + vim.keymap.set('n', "f1", function() harpoon:list():select(1) end) + vim.keymap.set('n', "f2", function() harpoon:list():select(2) end) + vim.keymap.set('n', "f3", function() harpoon:list():select(3) end) + vim.keymap.set('n', "f4", function() harpoon:list():select(4) end) + end +} diff --git a/nvim/lua/plugins/lua-line.lua b/nvim/lua/plugins/lua-line.lua new file mode 100644 index 0000000..02603ba --- /dev/null +++ b/nvim/lua/plugins/lua-line.lua @@ -0,0 +1,7 @@ +return { + 'nvim-lualine/lualine.nvim', + dependencies = { 'kyazdani42/nvim-web-devicons', opt = true }, + config = function() + require("lualine").setup() + end +} diff --git a/nvim/lua/plugins/mason.lua b/nvim/lua/plugins/mason.lua new file mode 100644 index 0000000..da77a45 --- /dev/null +++ b/nvim/lua/plugins/mason.lua @@ -0,0 +1,11 @@ +return { + { + 'williamboman/mason.nvim', + dependencies = 'williamboman/mason-lspconfig.nvim', + config = function() + require('mason-lspconfig').setup { + ensure_installed = { "lua-ls", "tsserver" } + } + end + } + } diff --git a/nvim/lua/plugins/mini-ai.lua b/nvim/lua/plugins/mini-ai.lua new file mode 100644 index 0000000..4d1feaf --- /dev/null +++ b/nvim/lua/plugins/mini-ai.lua @@ -0,0 +1,31 @@ +return { + "echasnovski/mini.ai", + event = "VeryLazy", + opts = function() + LazyVim.on_load("which-key.nvim", function() + vim.schedule(LazyVim.mini.ai_whichkey) + end) + local ai = require("mini.ai") + return { + n_lines = 500, + custom_textobjects = { + o = ai.gen_spec.treesitter({ -- code block + a = { "@block.outer", "@conditional.outer", "@loop.outer" }, + i = { "@block.inner", "@conditional.inner", "@loop.inner" }, + }), + f = ai.gen_spec.treesitter({ a = "@function.outer", i = "@function.inner" }), -- function + c = ai.gen_spec.treesitter({ a = "@class.outer", i = "@class.inner" }), -- class + t = { "<([%p%w]-)%f[^<%w][^<>]->.-", "^<.->().*()$" }, -- tags + d = { "%f[%d]%d+" }, -- digits + e = { -- Word with case + { "%u[%l%d]+%f[^%l%d]", "%f[%S][%l%d]+%f[^%l%d]", "%f[%P][%l%d]+%f[^%l%d]", "^[%l%d]+%f[^%l%d]" }, + "^().*()$", + }, + i = LazyVim.mini.ai_indent, -- indent + g = LazyVim.mini.ai_buffer, -- buffer + u = ai.gen_spec.function_call(), -- u for "Usage" + U = ai.gen_spec.function_call({ name_pattern = "[%w_]" }), -- without dot in function name + }, + } + end, +} diff --git a/nvim/lua/plugins/mini-pairs.lua b/nvim/lua/plugins/mini-pairs.lua new file mode 100644 index 0000000..e4ab308 --- /dev/null +++ b/nvim/lua/plugins/mini-pairs.lua @@ -0,0 +1,23 @@ +return { + "echasnovski/mini.pairs", + event = "VeryLazy", + opts = { + mappings = { + ["`"] = { action = "closeopen", pair = "``", neigh_pattern = "[^\\`].", register = { cr = false } }, + }, + }, + keys = { + { + "up", + function() + vim.g.minipairs_disable = not vim.g.minipairs_disable + if vim.g.minipairs_disable then + LazyVim.warn("Disabled auto pairs", { title = "Option" }) + else + LazyVim.info("Enabled auto pairs", { title = "Option" }) + end + end, + desc = "Toggle Auto Pairs", + }, + }, +} \ No newline at end of file diff --git a/nvim/lua/plugins/nerd-tree.lua b/nvim/lua/plugins/nerd-tree.lua new file mode 100644 index 0000000..33da75e --- /dev/null +++ b/nvim/lua/plugins/nerd-tree.lua @@ -0,0 +1,16 @@ +return { + "scrooloose/nerdtree", + lazy = false, + dependencies = { + { 'ryanoasis/vim-devicons' }, + { 'Xuyuanp/nerdtree-git-plugin' } + }, + config = function() + vim.keymap.set('n', '', ":NERDTreeToggle") + vim.keymap.set('n', 'zf', ":NERDTreeFind") + + vim.cmd [[ +let g:NERDTreeWinPos = "right" +]] + end, +} diff --git a/nvim/lua/plugins/nvim-cmp-settings.lua b/nvim/lua/plugins/nvim-cmp-settings.lua new file mode 100644 index 0000000..ca81789 --- /dev/null +++ b/nvim/lua/plugins/nvim-cmp-settings.lua @@ -0,0 +1,91 @@ +return { + "hrsh7th/nvim-cmp", + version = false, -- last release is way too old + event = "InsertEnter", + dependencies = { + "hrsh7th/cmp-nvim-lsp", + "hrsh7th/cmp-buffer", + "hrsh7th/cmp-path", + }, + -- Not all LSP servers add brackets when completing a function. + -- To better deal with this, LazyVim adds a custom option to cmp, + -- that you can configure. For example: + -- + -- ```lua + -- opts = { + -- auto_brackets = { "python" } + -- } + -- ``` + opts = function() + vim.api.nvim_set_hl(0, "CmpGhostText", { link = "Comment", default = true }) + local cmp = require("cmp") + local defaults = require("cmp.config.default")() + return { + auto_brackets = {}, -- configure any filetype to auto add brackets + completion = { + completeopt = "menu,menuone,noinsert", + }, + mapping = cmp.mapping.preset.insert({ + [""] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }), + [""] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }), + [""] = cmp.mapping.scroll_docs(-4), + [""] = cmp.mapping.scroll_docs(4), + [""] = cmp.mapping.complete(), + [""] = cmp.mapping.abort(), + [""] = LazyVim.cmp.confirm(), + [""] = LazyVim.cmp.confirm({ behavior = cmp.ConfirmBehavior.Replace }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. + [""] = function(fallback) + cmp.abort() + fallback() + end, + }), + sources = cmp.config.sources({ + { name = "nvim_lsp" }, + { name = "path" }, + }, { + { name = "buffer" }, + }), + formatting = { + format = function(_, item) + local icons = require("lazyvim.config").icons.kinds + if icons[item.kind] then + item.kind = icons[item.kind] .. item.kind + end + return item + end, + }, + experimental = { + ghost_text = { + hl_group = "CmpGhostText", + }, + }, + sorting = defaults.sorting, + } + end, + ---@param opts cmp.ConfigSchema | {auto_brackets?: string[]} + config = function(_, opts) + for _, source in ipairs(opts.sources) do + source.group_index = source.group_index or 1 + end + + local parse = require("cmp.utils.snippet").parse + require("cmp.utils.snippet").parse = function(input) + local ok, ret = pcall(parse, input) + if ok then + return ret + end + return LazyVim.cmp.snippet_preview(input) + end + + local cmp = require("cmp") + cmp.setup(opts) + cmp.event:on("confirm_done", function(event) + if vim.tbl_contains(opts.auto_brackets or {}, vim.bo.filetype) then + LazyVim.cmp.auto_brackets(event.entry) + end + end) + cmp.event:on("menu_opened", function(event) + LazyVim.cmp.add_missing_snippet_docs(event.window) + end) + end, +} \ No newline at end of file diff --git a/nvim/lua/plugins/nvim-cmp.lua b/nvim/lua/plugins/nvim-cmp.lua new file mode 100644 index 0000000..2adece2 --- /dev/null +++ b/nvim/lua/plugins/nvim-cmp.lua @@ -0,0 +1,74 @@ +return { + "nvim-cmp", + dependencies = { + { + { + "garymjr/nvim-snippets", + opts = { + friendly_snippets = true, + } + }, + "rafamadriz/friendly-snippets", + "L3MON4D3/LuaSnip", + "saadparwaiz1/cmp_luasnip" + }, + }, + opts = function(_, opts) + opts.snippet = { + expand = function(item) + return LazyVim.cmp.expand(item.body) + end, + } + end, + keys = { + { + "", + function() + return vim.snippet.active({ direction = 1 }) and "lua vim.snippet.jump(1)" or "" + end, + expr = true, + silent = true, + mode = { "i", "s" }, + }, + { + "", + function() + return vim.snippet.active({ direction = -1 }) and "lua vim.snippet.jump(-1)" or "" + end, + expr = true, + silent = true, + mode = { "i", "s" }, + }, + }, + -- setup = function() + -- snippet = { + -- expand = function(args) + -- -- vim.fn["vsnip#anonymous"](args.body) -- For `vsnip` users. + -- require('luasnip').lsp_expand(args.body) -- For `luasnip` users. + -- -- require('snippy').expand_snippet(args.body) -- For `snippy` users. + -- -- vim.fn["UltiSnips#Anon"](args.body) -- For `ultisnips` users. + -- -- vim.snippet.expand(args.body) -- For native neovim snippets (Neovim v0.10+) + -- end, + -- }, + -- window = { + -- -- completion = cmp.config.window.bordered(), + -- -- documentation = cmp.config.window.bordered(), + -- }, + -- mapping = cmp.mapping.preset.insert({ + -- [''] = cmp.mapping.scroll_docs(-4), + -- [''] = cmp.mapping.scroll_docs(4), + -- [''] = cmp.mapping.complete(), + -- [''] = cmp.mapping.abort(), + -- [''] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. + -- }), + -- sources = cmp.config.sources({ + -- -- { name = 'nvim_lsp' }, + -- -- { name = 'vsnip' }, -- For vsnip users. + -- { name = 'luasnip' }, -- For luasnip users. + -- -- { name = 'ultisnips' }, -- For ultisnips users. + -- -- { name = 'snippy' }, -- For snippy users. + -- }, { + -- { name = 'buffer' }, + -- }) + -- end, +} diff --git a/nvim/lua/plugins/nvim-lsp-settings.lua b/nvim/lua/plugins/nvim-lsp-settings.lua new file mode 100644 index 0000000..915388b --- /dev/null +++ b/nvim/lua/plugins/nvim-lsp-settings.lua @@ -0,0 +1,117 @@ +return { + "neovim/nvim-lspconfig", + dependencies = { + { + 'williamboman/mason.nvim', + config = function() + require("mason").setup { + ensure_installed = { "lua-ls", "tsserver", "rust_analyser" } + } + end, + }, + { + 'williamboman/mason-lspconfig.nvim', + } + }, + config = function() + local on_attach = function(client, bufnr) + if client.server_capabilities.documentFormattingProvider then + vim.api.nvim_create_autocmd("BufWritePre", { + group = vim.api.nvim_create_augroup("Format", { clear = true }), + buffer = bufnr, + callback = function() vim.lsp.buf.format({ async = true }) end + }) + end + -- Enable completion triggered by + vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc') + + -- Mappings. + -- See `:help vim.lsp.*` for documentation on any of the below functions + local bufopts = { noremap = true, silent = true, buffer = bufnr } + local opts = { noremap = true, silent = true } + vim.keymap.set('n', 'q', vim.diagnostic.setloclist, opts) + vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, bufopts) + vim.keymap.set('n', 'gd', vim.lsp.buf.definition, bufopts) + vim.keymap.set('n', 'e', vim.diagnostic.open_float, opts) + vim.keymap.set('n', 'vd', function() vim.diagnostic.open_float() end, opts) + vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, opts) + vim.keymap.set('n', ']d', vim.diagnostic.goto_next, opts) + vim.keymap.set('n', 'K', vim.lsp.buf.hover, bufopts) + vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, bufopts) + -- vim.keymap.set('n', '', vim.lsp.buf.signature_help, bufopts) + vim.keymap.set('n', 'wa', vim.lsp.buf.add_workspace_folder, bufopts) + vim.keymap.set('n', 'wr', vim.lsp.buf.remove_workspace_folder, bufopts) + vim.keymap.set('n', 'wl', function() + print(vim.inspect(vim.lsp.buf.list_workspace_folders())) + end, bufopts) + vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, bufopts) + vim.keymap.set('n', 'rn', vim.lsp.buf.rename, bufopts) + vim.keymap.set('n', 'ca', vim.lsp.buf.code_action, bufopts) + vim.keymap.set('n', 'gr', vim.lsp.buf.references, bufopts) + vim.keymap.set('n', 'f', vim.lsp.buf.format, bufopts) + end + + local lsp_flags = { + -- This is the default in Nvim 0.7+ + debounce_text_changes = 150, + } + require 'lspconfig'.pyright.setup { + on_attach = on_attach, + flags = lsp_flags, + } + require 'lspconfig'.tsserver.setup { + on_attach = on_attach, + flags = lsp_flags, + } + require 'lspconfig'.hls.setup { + on_attach = on_attach, + flags = lsp_flags, + } + + local pwBundlePath = 'C:/tools/PowerShellEditorServices/PowerShellEditorServices' + local pwShell = 'powershell.exe' + if vim.fn.has('macunix') ~= 0 then + pwBundlePath = '/Users/timothy/PowerShellEditorServices' + pwShell = 'pwsh' + end + + require 'lspconfig'.powershell_es.setup { + on_attach = on_attach, + flags = lsp_flags, + bundle_path = pwBundlePath, + shell = pwShell, + settings = { powershell = { codeFormatting = { Preset = 'Allman' } } } + } + + require 'lspconfig'.zls.setup {} + + require 'lspconfig'.lua_ls.setup { + on_attach = on_attach, + flags = lsp_flags, + settings = { + Lua = { + diagnostics = { + globals = { "vim", "use", "it", "describe" } + } + } + } + } + + local capabilities = require('cmp_nvim_lsp').default_capabilities(vim.lsp.protocol.make_client_capabilities()) + + local omnisharp_bin = "c:/tools/omnisharp-win-x64/omnisharp.exe" + + if vim.fn.has('macunix') ~= 0 then + omnisharp_bin = "/Users/timothy/binaries/omnisharp-osx-arm64-net6/omnisharp" + end + + local pid = vim.fn.getpid() + require 'lspconfig'.omnisharp.setup { + on_attach = on_attach, + flags = lsp_flags, + capabilities = capabilities, + cmd = { omnisharp_bin, "--languageserver", "--hostPID", tostring(pid) } + -- Additional configuration can be added here + } + end +} diff --git a/nvim/lua/plugins/nvim-treesitter.lua b/nvim/lua/plugins/nvim-treesitter.lua new file mode 100644 index 0000000..1e47941 --- /dev/null +++ b/nvim/lua/plugins/nvim-treesitter.lua @@ -0,0 +1,17 @@ +return { +{ + "nvim-treesitter/nvim-treesitter", + build = ":TSUpdate", + config = function () + local configs = require("nvim-treesitter.configs") + + configs.setup({ + ensure_installed = { "c", "lua", "vim", "vimdoc", "query", "elixir", "heex", "javascript", "html", "typescript", "haskell", "go", "zig" }, + sync_install = false, + highlight = { enable = true }, + indent = { enable = true }, + }) + end + } + } + diff --git a/nvim/lua/plugins/oil.lua b/nvim/lua/plugins/oil.lua new file mode 100644 index 0000000..8dcccc6 --- /dev/null +++ b/nvim/lua/plugins/oil.lua @@ -0,0 +1,24 @@ +return { + 'stevearc/oil.nvim', + + dependencies = { + "nvim-tree/nvim-web-devicons", + }, + config = function() + require("oil").setup { + columns = { "icon" }, + keymaps = { + [""] = false, + [""] = "actions.select_split", + }, + view_options = { + show_hidden = true, + }, + } + -- Open parent directory in current window + vim.keymap.set("n", "-", "Oil", { desc = "Open parent directory" }) + + -- Open parent directory in floating window + vim.keymap.set("n", "-", require("oil").toggle_float) + end, +} diff --git a/nvim/lua/plugins/sendtoterm.lua b/nvim/lua/plugins/sendtoterm.lua new file mode 100644 index 0000000..31c5fc2 --- /dev/null +++ b/nvim/lua/plugins/sendtoterm.lua @@ -0,0 +1,3 @@ +return { + 'mtikekar/nvim-send-to-term' +} diff --git a/nvim/lua/plugins/telescope.lua b/nvim/lua/plugins/telescope.lua new file mode 100644 index 0000000..6c6f4f3 --- /dev/null +++ b/nvim/lua/plugins/telescope.lua @@ -0,0 +1,31 @@ +return { + { + 'nvim-telescope/telescope.nvim', + tag = '0.1.5', + branch = "0.1.x", + dependencies = { + 'nvim-lua/plenary.nvim', + 'nvim-telescope/telescope-ui-select.nvim' + }, + config = function() + local builtin = require('telescope.builtin') + vim.keymap.set('n', 'ff', builtin.find_files, {}) + vim.keymap.set('n', 'fg', builtin.live_grep, {}) + vim.keymap.set('n', 'fb', builtin.buffers, {}) + vim.keymap.set('n', 'fh', builtin.help_tags, {}) + require('telescope').setup { + extensions = { + ["ui-select"] = { + entry_maker = require("telescope.themes").get_dropdown + }, + defaults = { + file_ignore_patterns = { + "node_modules", + ".git" + } + } + } + } + end + } +} diff --git a/nvim/lua/plugins/tpope-standard.lua b/nvim/lua/plugins/tpope-standard.lua new file mode 100644 index 0000000..8d196c8 --- /dev/null +++ b/nvim/lua/plugins/tpope-standard.lua @@ -0,0 +1,5 @@ +return { + 'tpope/vim-repeat', + 'tpope/vim-surround', + 'tpope/vim-unimpaired', +} diff --git a/nvim/lua/plugins/undo.lua b/nvim/lua/plugins/undo.lua new file mode 100644 index 0000000..6e56845 --- /dev/null +++ b/nvim/lua/plugins/undo.lua @@ -0,0 +1,6 @@ +return { + "mbbill/undotree", + config = function() + vim.keymap.set('n', 'u', ':UndotreeToggle') + end +} diff --git a/nvim/lua/plugins/vim-grepper.lua b/nvim/lua/plugins/vim-grepper.lua new file mode 100644 index 0000000..cdcc627 --- /dev/null +++ b/nvim/lua/plugins/vim-grepper.lua @@ -0,0 +1,15 @@ +return +{ + { + 'mhinz/vim-grepper', + config = function() + vim.cmd([[ +let g:grepper = {} +let g:grepper.tools = ['rg', 'grep', 'git'] + ]]) + local opts = { noremap = true, silent = true } + vim.keymap.set('n', 'G', ':Grepper -tool rg', opts) + vim.keymap.set('n', 'g', ':Grepper -tool git', opts) + end + } +} diff --git a/nvim/lua/plugins/zenmode.lua b/nvim/lua/plugins/zenmode.lua new file mode 100644 index 0000000..9a52a2d --- /dev/null +++ b/nvim/lua/plugins/zenmode.lua @@ -0,0 +1,6 @@ +return { + "folke/zen-mode.nvim", + opts = { + vim.keymap.set('n', 'zz', ":ZenMode") + } +} diff --git a/nvim/plugin/copilot-chat.lua.backup b/nvim/plugin/copilot-chat.lua.backup deleted file mode 100644 index 0b6a85d..0000000 --- a/nvim/plugin/copilot-chat.lua.backup +++ /dev/null @@ -1,58 +0,0 @@ -require("CopilotChat").setup { - debug = true, - filetypes = { - "lua", - "python", - "sh", - "c", - "cpp", - "rust", - "go", - "javascript", - "typescript", - "html", - "css", - "json", - "yaml", - "toml", - "markdown", - "vim", - "dockerfile", - "sql", - "java", - "php", - "ruby", - "lua", - "python", - "sh", - "c", - "cpp", - "rust", - "go", - "javascript", - "typescript", - "html", - "css", - "json", - "yaml", - "toml", - "markdown", - "vim", - "dockerfile", - "sql", - "java", - "php", - "ruby", - }, - on_attach = function(client, bufnr) - require("lsp-status").on_attach(client, bufnr) - end, - on_init = function(client, bufnr) - require("lsp-status").on_init(client, bufnr) - end, - on_exit = function(client, bufnr) - require("lsp-status").on_exit(client, bufnr) - end, -} - --- vim.g.copilot_filetypes = {'lua', 'python', 'sh', 'c', 'cpp', 'rust', 'go', 'javascript', 'typescript', 'html', 'css', 'json', 'yaml', 'toml', 'markdown', 'vim', 'dockerfile', 'sql', 'java', 'php', 'ruby', 'lua', 'python', 'sh', 'c', 'cpp', 'rust', 'go', 'javascript', 'typescript', 'html', 'css', 'json', 'yaml', 'toml', 'markdown', 'vim', 'dockerfile', 'sql', 'java', 'php', 'ruby'} diff --git a/nvim/plugin/fugitive-settings.lua b/nvim/plugin/fugitive-settings.lua deleted file mode 100644 index 77afbf6..0000000 --- a/nvim/plugin/fugitive-settings.lua +++ /dev/null @@ -1,8 +0,0 @@ -vim.keymap.set('n', 'gs', ':Git') -vim.keymap.set('n', 'gps', ':Git push') -vim.keymap.set('n', 'gpl', ':Git pull') -vim.keymap.set('n', 'gpf', ':Git fetch') -vim.keymap.set('n', 'gbl', ':Git blame') --- vim.keymap.set('n', 'gpr', ':Git rebase') -vim.keymap.set('n', 'gdu', 'diffget //2') -vim.keymap.set('n', 'gdi', 'diffget //3') diff --git a/nvim/plugin/fzf-settings.lua.backup b/nvim/plugin/fzf-settings.lua.backup deleted file mode 100644 index ee77917..0000000 --- a/nvim/plugin/fzf-settings.lua.backup +++ /dev/null @@ -1,8 +0,0 @@ -vim.keymap.set('n','', ":FZF") -vim.keymap.set('n','', ":Buffers") -vim.cmd[[ -let $FZF_DEFAULT_OPTS="--ansi --preview-window 'right:60%' --layout reverse --margin=1,4 --preview 'bat --color=always --style=header,grid --line-range :300 {}' --bind 'j:down,k:up,ctrl-j:preview-down,ctrl-k:preview-up'" -let $FZF_DEFAULT_COMMAND ='rg --files ' - -let g:fzf_buffers_jump = 1 -]] diff --git a/nvim/plugin/grepper-settings.vim b/nvim/plugin/grepper-settings.vim deleted file mode 100644 index 133145a..0000000 --- a/nvim/plugin/grepper-settings.vim +++ /dev/null @@ -1,19 +0,0 @@ -let g:grepper = {} -let g:grepper.tools = ['rg', 'grep', 'git'] -" Search for the current word -nnoremap * :Grepper -cword -noprompt -" Search for the current selection -" TODO: This will collide with gs => used for sorting by the vim-sort-motion plugin -nmap gs (GrepperOperator) -xmap gs (GrepperOperator) -nnoremap g :Grepper -tool git -nnoremap G :Grepper -tool rg - -" Set up alias grep for GrepperGrep -function! SetupCommandAlias(input, output) - exec 'cabbrev '.a:input - \ .' ((getcmdtype() is# ":" && getcmdline() is# "'.a:input.'")' - \ .'? ("'.a:output.'") : ("'.a:input.'"))' -endfunction - -call SetupCommandAlias("grep", "GrepperGrep") diff --git a/nvim/plugin/gruvbox-settings.lua b/nvim/plugin/gruvbox-settings.lua deleted file mode 100644 index e387281..0000000 --- a/nvim/plugin/gruvbox-settings.lua +++ /dev/null @@ -1 +0,0 @@ -vim.cmd[[colorscheme gruvbox]] diff --git a/nvim/plugin/harpoon-settings.lua b/nvim/plugin/harpoon-settings.lua deleted file mode 100644 index 4006669..0000000 --- a/nvim/plugin/harpoon-settings.lua +++ /dev/null @@ -1,41 +0,0 @@ -local harpoon = require('harpoon') --- require("telescope").load_extension('harpoon') --- require("harpoon").setup({ ... }) --- local silent = { silent = true } --- --- -- Terminal commands --- -- ueoa is first through fourth finger left hand home row. --- -- This just means I can crush, with opposite hand, the 4 terminal positions --- -- - -harpoon:setup({}) - --- basic telescope configuration -local conf = require("telescope.config").values -local function toggle_telescope(harpoon_files) - local file_paths = {} - for _, item in ipairs(harpoon_files.items) do - table.insert(file_paths, item.value) - end - - require("telescope.pickers").new({}, { - prompt_title = "Harpoon", - finder = require("telescope.finders").new_table({ - results = file_paths, - }), - previewer = conf.file_previewer({}), - sorter = conf.generic_sorter({}), - }):find() -end - -vim.keymap.set("n", "", function() toggle_telescope(harpoon:list()) end, - { desc = "Open harpoon window" }) --- -- These functions are stored in harpoon. A plugn that I am developing -vim.keymap.set("n", "a", function() harpoon:list():add() end) --- vim.keymap.set('n', "", function() require("harpoon.ui").toggle_quick_menu() end, silent) -vim.keymap.set("n", "hm", function() harpoon.ui:toggle_quick_menu(harpoon:list()) end) --- -vim.keymap.set('n', "f1", function() harpoon:list():select(1) end) -vim.keymap.set('n', "f2", function() harpoon:list():select(2) end) -vim.keymap.set('n', "f3", function() harpoon:list():select(3) end) -vim.keymap.set('n', "f4", function() harpoon:list():select(4) end) diff --git a/nvim/plugin/lualine-settings.lua b/nvim/plugin/lualine-settings.lua deleted file mode 100644 index 1c7e839..0000000 --- a/nvim/plugin/lualine-settings.lua +++ /dev/null @@ -1,3 +0,0 @@ -require("lualine").setup() - - diff --git a/nvim/plugin/neoformat-settings.lua.backup b/nvim/plugin/neoformat-settings.lua.backup deleted file mode 100644 index 21a3558..0000000 --- a/nvim/plugin/neoformat-settings.lua.backup +++ /dev/null @@ -1,20 +0,0 @@ -vim.cmd [[ - let g:neoformat_try_node_exe = 1 -<<<<<<< HEAD - -======= ->>>>>>> 3ee9629ad08857f6ebd2f54f92fb82801c9058a5 -augroup NeoformatAutoFormat - autocmd! - autocmd FileType javascript,javascript.jsx setlocal formatprg=prettier\ - \--stdin\ - \--print-width\ 80\ - \--single-quote\ - \--trailing-comma\ es5 -<<<<<<< HEAD - autocmd BufWritePre *.js,*.jsx Neoformat -======= - autocmd BufWritePre *.js,*.jsx undojoin | Neoformat ->>>>>>> 3ee9629ad08857f6ebd2f54f92fb82801c9058a5 -augroup END -]] diff --git a/nvim/plugin/nerd-tree-settings.lua b/nvim/plugin/nerd-tree-settings.lua deleted file mode 100644 index 9113eb1..0000000 --- a/nvim/plugin/nerd-tree-settings.lua +++ /dev/null @@ -1,6 +0,0 @@ -vim.keymap.set('n','', ":NERDTreeToggle") -vim.keymap.set('n','zf', ":NERDTreeFind") - -vim.cmd[[ -let g:NERDTreeWinPos = "right" -]] diff --git a/nvim/plugin/nvim-dap.lua b/nvim/plugin/nvim-dap.lua deleted file mode 100644 index 8a83ba5..0000000 --- a/nvim/plugin/nvim-dap.lua +++ /dev/null @@ -1,55 +0,0 @@ -local dap = require("dap") - -dap.adapters.coreclr = { - type = 'executable', - command = '/usr/local/netcoredbg', - args = { '--interpreter=vscode' } -} - -dap.configurations.ps1 = { - { - type = 'ps1', - name = "Attach to process", - request = "attach", - pid = require('dap.utils').pick_process, - args = {}, - } - } - - -dap.configurations.cs = { - { - type = "coreclr", - name = "launch - netcoredbg", - request = "launch", - program = function() - return vim.fn.input('Path to dll', vim.fn.getcwd() .. '/bin/Debug/', 'file') - end, - }, -} - - -vim.keymap.set('n', '', function() require('dap').continue() end) -vim.keymap.set('n', '', function() require('dap').step_over() end) -vim.keymap.set('n', '', function() require('dap').step_into() end) -vim.keymap.set('n', '', function() require('dap').step_out() end) -vim.keymap.set('n', 'b', function() require('dap').toggle_breakpoint() end) -vim.keymap.set('n', 'B', function() require('dap').set_breakpoint() end) -vim.keymap.set('n', 'lp', - function() require('dap').set_breakpoint(nil, nil, vim.fn.input('Log point message: ')) end) -vim.keymap.set('n', 'dr', function() require('dap').repl.open() end) -vim.keymap.set('n', 'dl', function() require('dap').run_last() end) -vim.keymap.set({ 'n', 'v' }, 'dh', function() - require('dap.ui.widgets').hover() -end) -vim.keymap.set({ 'n', 'v' }, 'dp', function() - require('dap.ui.widgets').preview() -end) -vim.keymap.set('n', 'df', function() - local widgets = require('dap.ui.widgets') - widgets.centered_float(widgets.frames) -end) -vim.keymap.set('n', 'ds', function() - local widgets = require('dap.ui.widgets') - widgets.centered_float(widgets.scopes) -end) diff --git a/nvim/plugin/nvim-lsp-settings.lua b/nvim/plugin/nvim-lsp-settings.lua deleted file mode 100644 index de47275..0000000 --- a/nvim/plugin/nvim-lsp-settings.lua +++ /dev/null @@ -1,108 +0,0 @@ --- Mappings. --- See `:help vim.diagnostic.*` for documentation on any of the below functions - -require("mason").setup() -require("mason-lspconfig").setup { - ensure_installed = { "lua_ls", "rust_analyzer" }, -} - --- Use an on_attach function to only map the following keys --- after the language server attaches to the current buffer -local on_attach = function(client, bufnr) - if client.server_capabilities.documentFormattingProvider then - vim.api.nvim_create_autocmd("BufWritePre", { - group = vim.api.nvim_create_augroup("Format", { clear = true }), - buffer = bufnr, - callback = function() vim.lsp.buf.format({ async = true }) end - }) - end - -- Enable completion triggered by - vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc') - - -- Mappings. - -- See `:help vim.lsp.*` for documentation on any of the below functions - local bufopts = { noremap = true, silent = true, buffer = bufnr } - local opts = { noremap = true, silent = true } - vim.keymap.set('n', 'q', vim.diagnostic.setloclist, opts) - vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, bufopts) - vim.keymap.set('n', 'gd', vim.lsp.buf.definition, bufopts) - vim.keymap.set('n', 'e', vim.diagnostic.open_float, opts) - vim.keymap.set('n', 'vd', function() vim.diagnostic.open_float() end, opts) - vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, opts) - vim.keymap.set('n', ']d', vim.diagnostic.goto_next, opts) - vim.keymap.set('n', 'K', vim.lsp.buf.hover, bufopts) - vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, bufopts) - -- vim.keymap.set('n', '', vim.lsp.buf.signature_help, bufopts) - vim.keymap.set('n', 'wa', vim.lsp.buf.add_workspace_folder, bufopts) - vim.keymap.set('n', 'wr', vim.lsp.buf.remove_workspace_folder, bufopts) - vim.keymap.set('n', 'wl', function() - print(vim.inspect(vim.lsp.buf.list_workspace_folders())) - end, bufopts) - vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, bufopts) - vim.keymap.set('n', 'rn', vim.lsp.buf.rename, bufopts) - vim.keymap.set('n', 'ca', vim.lsp.buf.code_action, bufopts) - vim.keymap.set('n', 'gr', vim.lsp.buf.references, bufopts) - vim.keymap.set('n', 'f', vim.lsp.buf.format, bufopts) -end - -local lsp_flags = { - -- This is the default in Nvim 0.7+ - debounce_text_changes = 150, -} -require 'lspconfig'.pyright.setup { - on_attach = on_attach, - flags = lsp_flags, -} -require 'lspconfig'.tsserver.setup { - on_attach = on_attach, - flags = lsp_flags, -} -require 'lspconfig'.hls.setup { - on_attach = on_attach, - flags = lsp_flags, -} - -local pwBundlePath = 'C:/tools/PowerShellEditorServices' -local pwShell = 'powershell.exe' -if vim.fn.has('macunix') ~= 0 then - pwBundlePath = '/Users/timothy/PowerShellEditorServices' - pwShell = 'pwsh' -end - -require 'lspconfig'.powershell_es.setup { - on_attach = on_attach, - flags = lsp_flags, - bundle_path = pwBundlePath, - shell = pwShell, - settings = { powershell = { codeFormatting = { Preset = 'Allman' } } } -} - -require 'lspconfig'.lua_ls.setup { - on_attach = on_attach, - flags = lsp_flags, - settings = { - Lua = { - diagnostics = { - globals = { "vim", "use", "it", "describe" } - } - } - } -} - -local capabilities = require('cmp_nvim_lsp').default_capabilities(vim.lsp.protocol.make_client_capabilities()) - -local omnisharp_bin = "c:/tools/omnisharp-win-x64/omnisharp.exe" - -if vim.fn.has('macunix') ~= 0 then - omnisharp_bin = "/Users/timothy/binaries/omnisharp-osx-arm64-net6/omnisharp" -end - -local pid = vim.fn.getpid() -require 'lspconfig'.omnisharp.setup { - on_attach = on_attach, - flags = lsp_flags, - capabilities = capabilities, - cmd = { omnisharp_bin, "--languageserver", "--hostPID", tostring(pid) } - -- Additional configuration can be added here -} --- require'lspconfig'.csharp_ls.setup{} diff --git a/nvim/plugin/nvim-send-to-term.lua b/nvim/plugin/nvim-send-to-term.lua deleted file mode 100644 index c88a9f8..0000000 --- a/nvim/plugin/nvim-send-to-term.lua +++ /dev/null @@ -1,4 +0,0 @@ -vim.keymap.set('n', 'ss', 'SendLine') -vim.keymap.set('n', 's', 'Send') -vim.keymap.set('v', 's', 'Send') -vim.keymap.set('n', 'S', 's$') diff --git a/nvim/plugin/nvm-cmp-settings.lua b/nvim/plugin/nvm-cmp-settings.lua deleted file mode 100755 index c145fbe..0000000 --- a/nvim/plugin/nvm-cmp-settings.lua +++ /dev/null @@ -1,61 +0,0 @@ - local cmp = require'cmp' - - cmp.setup({ - snippet = { - -- REQUIRED - you must specify a snippet engine - expand = function(args) - vim.fn["vsnip#anonymous"](args.body) -- For `vsnip` users. - -- require('luasnip').lsp_expand(args.body) -- For `luasnip` users. - -- require('snippy').expand_snippet(args.body) -- For `snippy` users. - -- vim.fn["UltiSnips#Anon"](args.body) -- For `ultisnips` users. - end, - }, - window = { - -- completion = cmp.config.window.bordered(), - -- documentation = cmp.config.window.bordered(), - }, - mapping = cmp.mapping.preset.insert({ - [''] = cmp.mapping.scroll_docs(-4), - [''] = cmp.mapping.scroll_docs(4), - [''] = cmp.mapping.complete(), - [''] = cmp.mapping.abort(), - [''] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. - }), - sources = cmp.config.sources({ - { name = 'nvim_lsp' }, - { name = 'vsnip' }, -- For vsnip users. - -- { name = 'luasnip' }, -- For luasnip users. - -- { name = 'ultisnips' }, -- For ultisnips users. - -- { name = 'snippy' }, -- For snippy users. - }, { - { name = 'buffer' }, - }) - }) - - -- Set configuration for specific filetype. - cmp.setup.filetype('gitcommit', { - sources = cmp.config.sources({ - { name = 'cmp_git' }, -- You can specify the `cmp_git` source if you were installed it. - }, { - { name = 'buffer' }, - }) - }) - - -- Use buffer source for `/` (if you enabled `native_menu`, this won't work anymore). - cmp.setup.cmdline('/', { - mapping = cmp.mapping.preset.cmdline(), - sources = { - { name = 'buffer' } - } - }) - - -- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore). - cmp.setup.cmdline(':', { - mapping = cmp.mapping.preset.cmdline(), - sources = cmp.config.sources({ - { name = 'path' } - }, { - { name = 'cmdline' } - }) - }) - diff --git a/nvim/plugin/obsidian-settings.lua.backup b/nvim/plugin/obsidian-settings.lua.backup deleted file mode 100644 index 3f52e9b..0000000 --- a/nvim/plugin/obsidian-settings.lua.backup +++ /dev/null @@ -1,294 +0,0 @@ -require("obsidian").setup( - { - -- A list of workspace names, paths, and configuration overrides. - -- If you use the Obsidian app, the 'path' of a workspace should generally be - -- your vault root (where the `.obsidian` folder is located). - -- When obsidian.nvim is loaded by your plugin manager, it will automatically set - -- the workspace to the first workspace in the list whose `path` is a parent of the - -- current markdown file being edited. - workspaces = { - { - name = "personal", - path = "/Users/timothy/Library/CloudStorage/OneDrive-Personal/Obsidian/Personal" - -- path = "~/vaults/personal", - }, - { - name = "work", - path = "/Users/timothy/Library/CloudStorage/OneDrive-Personal/Obsidian/Work", - -- Optional, override certain settings. - overrides = { - notes_subdir = "notes", - }, - }, - }, - - -- Alternatively - and for backwards compatibility - you can set 'dir' to a single path instead of - -- 'workspaces'. For example: - -- dir = "~/vaults/work", - - -- Optional, if you keep notes in a specific subdirectory of your vault. - notes_subdir = "notes", - - -- Optional, set the log level for obsidian.nvim. This is an integer corresponding to one of the log - -- levels defined by "vim.log.levels.*". - log_level = vim.log.levels.INFO, - - daily_notes = { - -- Optional, if you keep daily notes in a separate directory. - folder = "notes/dailies", - -- Optional, if you want to change the date format for the ID of daily notes. - date_format = "%Y-%m-%d", - -- Optional, if you want to change the date format of the default alias of daily notes. - alias_format = "%B %-d, %Y", - -- Optional, if you want to automatically insert a template from your template directory like 'daily.md' - template = nil - }, - - -- Optional, completion of wiki links, local markdown links, and tags using nvim-cmp. - completion = { - -- Set to false to disable completion. - nvim_cmp = true, - -- Trigger completion at 2 chars. - min_chars = 2, - }, - - -- Optional, configure key mappings. These are the defaults. If you don't want to set any keymappings this - -- way then set 'mappings = {}'. - mappings = { - -- Overrides the 'gf' mapping to work on markdown/wiki links within your vault. - ["gf"] = { - action = function() - return require("obsidian").util.gf_passthrough() - end, - opts = { noremap = false, expr = true, buffer = true }, - }, - -- Toggle check-boxes. - ["ch"] = { - action = function() - return require("obsidian").util.toggle_checkbox() - end, - opts = { buffer = true }, - }, - }, - - -- Where to put new notes. Valid options are - -- * "current_dir" - put new notes in same directory as the current buffer. - -- * "notes_subdir" - put new notes in the default notes subdirectory. - new_notes_location = "notes_subdir", - - -- Optional, customize how note IDs are generated given an optional title. - ---@param title string|? - ---@return string - note_id_func = function(title) - -- Create note IDs in a Zettelkasten format with a timestamp and a suffix. - -- In this case a note with the title 'My new note' will be given an ID that looks - -- like '1657296016-my-new-note', and therefore the file name '1657296016-my-new-note.md' - local suffix = "" - if title ~= nil then - -- If title is given, transform it into valid file name. - suffix = title:gsub(" ", "-"):gsub("[^A-Za-z0-9-]", ""):lower() - else - -- If title is nil, just add 4 random uppercase letters to the suffix. - for _ = 1, 4 do - suffix = suffix .. string.char(math.random(65, 90)) - end - end - return tostring(os.time()) .. "-" .. suffix - end, - - -- Optional, customize how note file names are generated given the ID, target directory, and title. - ---@param spec { id: string, dir: obsidian.Path, title: string|? } - ---@return string|obsidian.Path The full path to the new note. - note_path_func = function(spec) - -- This is equivalent to the default behavior. - local path = spec.dir / tostring(spec.id) - return path:with_suffix(".md") - end, - - -- Optional, customize how wiki links are formatted. You can set this to one of: - -- * "use_alias_only", e.g. '[[Foo Bar]]' - -- * "prepend_note_id", e.g. '[[foo-bar|Foo Bar]]' - -- * "prepend_note_path", e.g. '[[foo-bar.md|Foo Bar]]' - -- * "use_path_only", e.g. '[[foo-bar.md]]' - -- Or you can set it to a function that takes a table of options and returns a string, like this: - wiki_link_func = function(opts) - return require("obsidian.util").wiki_link_id_prefix(opts) - end, - - -- Optional, customize how markdown links are formatted. - markdown_link_func = function(opts) - return require("obsidian.util").markdown_link(opts) - end, - - -- Either 'wiki' or 'markdown'. - preferred_link_style = "wiki", - - -- Optional, customize the default name or prefix when pasting images via `:ObsidianPasteImg`. - ---@return string - image_name_func = function() - -- Prefix image names with timestamp. - return string.format("%s-", os.time()) - end, - - -- Optional, boolean or a function that takes a filename and returns a boolean. - -- `true` indicates that you don't want obsidian.nvim to manage frontmatter. - disable_frontmatter = false, - - -- Optional, alternatively you can customize the frontmatter data. - ---@return table - note_frontmatter_func = function(note) - -- Add the title of the note as an alias. - if note.title then - note:add_alias(note.title) - end - - local out = { id = note.id, aliases = note.aliases, tags = note.tags } - - -- `note.metadata` contains any manually added fields in the frontmatter. - -- So here we just make sure those fields are kept in the frontmatter. - if note.metadata ~= nil and not vim.tbl_isempty(note.metadata) then - for k, v in pairs(note.metadata) do - out[k] = v - end - end - - return out - end, - - -- Optional, for templates (see below). - templates = { - subdir = "templates", - date_format = "%Y-%m-%d", - time_format = "%H:%M", - -- A map for custom variables, the key should be the variable and the value a function - substitutions = {}, - }, - - -- Optional, by default when you use `:ObsidianFollowLink` on a link to an external - -- URL it will be ignored but you can customize this behavior here. - ---@param url string - follow_url_func = function(url) - -- Open the URL in the default web browser. - vim.fn.jobstart({ "open", url }) -- Mac OS - -- vim.fn.jobstart({"xdg-open", url}) -- linux - end, - - -- Optional, set to true if you use the Obsidian Advanced URI plugin. - -- https://github.com/Vinzent03/obsidian-advanced-uri - use_advanced_uri = false, - - -- Optional, set to true to force ':ObsidianOpen' to bring the app to the foreground. - open_app_foreground = false, - - picker = { - -- Set your preferred picker. Can be one of 'telescope.nvim', 'fzf-lua', or 'mini.pick'. - name = "telescope.nvim", - -- Optional, configure key mappings for the picker. These are the defaults. - -- Not all pickers support all mappings. - mappings = { - -- Create a new note from your query. - new = "", - -- Insert a link to the selected note. - insert_link = "", - }, - }, - - -- Optional, sort search results by "path", "modified", "accessed", or "created". - -- The recommend value is "modified" and `true` for `sort_reversed`, which means, for example, - -- that `:ObsidianQuickSwitch` will show the notes sorted by latest modified time - sort_by = "modified", - sort_reversed = true, - - -- Optional, determines how certain commands open notes. The valid options are: - -- 1. "current" (the default) - to always open in the current window - -- 2. "vsplit" - to open in a vertical split if there's not already a vertical split - -- 3. "hsplit" - to open in a horizontal split if there's not already a horizontal split - open_notes_in = "current", - - -- Optional, define your own callbacks to further customize behavior. - callbacks = { - -- Runs at the end of `require("obsidian").setup()`. - ---@param client obsidian.Client - post_setup = function(client) end, - - -- Runs anytime you enter the buffer for a note. - ---@param client obsidian.Client - ---@param note obsidian.Note - enter_note = function(client, note) end, - - -- Runs anytime you leave the buffer for a note. - ---@param client obsidian.Client - ---@param note obsidian.Note - leave_note = function(client, note) end, - - -- Runs right before writing the buffer for a note. - ---@param client obsidian.Client - ---@param note obsidian.Note - pre_write_note = function(client, note) end, - - -- Runs anytime the workspace is set/changed. - ---@param client obsidian.Client - ---@param workspace obsidian.Workspace - post_set_workspace = function(client, workspace) end, - }, - - -- Optional, configure additional syntax highlighting / extmarks. - -- This requires you have `conceallevel` set to 1 or 2. See `:help conceallevel` for more details. - ui = { - enable = true, -- set to false to disable all additional syntax features - update_debounce = 200, -- update delay after a text change (in milliseconds) - -- Define how various check-boxes are displayed - checkboxes = { - -- NOTE: the 'char' value has to be a single character, and the highlight groups are defined below. - -- [" "] = { char = "󰄱", hl_group = "ObsidianTodo" }, - [" "] = { char = "☐", hl_group = "ObsidianTodo" }, - ["x"] = { char = "", hl_group = "ObsidianDone" }, - [">"] = { char = "", hl_group = "ObsidianRightArrow" }, - ["~"] = { char = "󰰱", hl_group = "ObsidianTilde" }, - -- Replace the above with this if you don't have a patched font: - -- ["x"] = { char = "✔", hl_group = "ObsidianDone" }, - - -- You can also add more custom ones... - }, - -- Use bullet marks for non-checkbox lists. - bullets = { char = "•", hl_group = "ObsidianBullet" }, - external_link_icon = { char = "", hl_group = "ObsidianExtLinkIcon" }, - -- Replace the above with this if you don't have a patched font: - -- external_link_icon = { char = "", hl_group = "ObsidianExtLinkIcon" }, - reference_text = { hl_group = "ObsidianRefText" }, - highlight_text = { hl_group = "ObsidianHighlightText" }, - tags = { hl_group = "ObsidianTag" }, - block_ids = { hl_group = "ObsidianBlockID" }, - hl_groups = { - -- The options are passed directly to `vim.api.nvim_set_hl()`. See `:help nvim_set_hl`. - ObsidianTodo = { bold = true, fg = "#f78c6c" }, - ObsidianDone = { bold = true, fg = "#89ddff" }, - ObsidianRightArrow = { bold = true, fg = "#f78c6c" }, - ObsidianTilde = { bold = true, fg = "#ff5370" }, - ObsidianBullet = { bold = true, fg = "#89ddff" }, - ObsidianRefText = { underline = true, fg = "#c792ea" }, - ObsidianExtLinkIcon = { fg = "#c792ea" }, - ObsidianTag = { italic = true, fg = "#89ddff" }, - ObsidianBlockID = { italic = true, fg = "#89ddff" }, - ObsidianHighlightText = { bg = "#75662e" }, - }, - }, - - -- Specify how to handle attachments. - attachments = { - -- The default folder to place images in via `:ObsidianPasteImg`. - -- If this is a relative path it will be interpreted as relative to the vault root. - -- You can always override this per image by passing a full path to the command instead of just a filename. - img_folder = "assets/imgs", -- This is the default - -- A function that determines the text to insert in the note when pasting an image. - -- It takes two arguments, the `obsidian.Client` and an `obsidian.Path` to the image file. - -- This is the default implementation. - ---@param client obsidian.Client - ---@param path obsidian.Path the absolute path to the image file - ---@return string - img_text_func = function(client, path) - path = client:vault_relative_path(path) or path - return string.format("![%s](%s)", path.name, path) - end, - }, - }) diff --git a/nvim/plugin/overseer-settings.lua b/nvim/plugin/overseer-settings.lua deleted file mode 100755 index 47ee289..0000000 --- a/nvim/plugin/overseer-settings.lua +++ /dev/null @@ -1,171 +0,0 @@ -require("overseer").setup({ - -- Default task strategy - strategy = "terminal", - -- Template modules to load - templates = { "builtin" }, - -- When true, tries to detect a green color from your colorscheme to use for success highlight - auto_detect_success_color = true, - -- Patch nvim-dap to support preLaunchTask and postDebugTask - dap = true, - -- Configure the task list - task_list = { - -- Default detail level for tasks. Can be 1-3. - default_detail = 1, - -- Width dimensions can be integers or a float between 0 and 1 (e.g. 0.4 for 40%) - -- min_width and max_width can be a single value or a list of mixed integer/float types. - -- max_width = {100, 0.2} means "the lesser of 100 columns or 20% of total" - max_width = { 100, 0.2 }, - -- min_width = {40, 0.1} means "the greater of 40 columns or 10% of total" - min_width = { 40, 0.1 }, - -- optionally define an integer/float for the exact width of the task list - width = nil, - -- String that separates tasks - separator = "────────────────────────────────────────", - -- Default direction. Can be "left" or "right" - direction = "left", - -- Set keymap to false to remove default behavior - -- You can add custom keymaps here as well (anything vim.keymap.set accepts) - bindings = { - ["?"] = "ShowHelp", - [""] = "RunAction", - [""] = "Edit", - ["o"] = "Open", - [""] = "OpenVsplit", - [""] = "OpenSplit", - [""] = "OpenFloat", - ["p"] = "TogglePreview", - [""] = "IncreaseDetail", - [""] = "DecreaseDetail", - ["L"] = "IncreaseAllDetail", - ["H"] = "DecreaseAllDetail", - ["["] = "DecreaseWidth", - ["]"] = "IncreaseWidth", - ["{"] = "PrevTask", - ["}"] = "NextTask", - }, - }, - -- See :help overseer.actions - actions = {}, - -- Configure the floating window used for task templates that require input - -- and the floating window used for editing tasks - form = { - border = "rounded", - zindex = 40, - -- Dimensions can be integers or a float between 0 and 1 (e.g. 0.4 for 40%) - -- min_X and max_X can be a single value or a list of mixed integer/float types. - min_width = 80, - max_width = 0.9, - width = nil, - min_height = 10, - max_height = 0.9, - height = nil, - -- Set any window options here (e.g. winhighlight) - win_opts = { - winblend = 10, - }, - }, - task_launcher = { - -- Set keymap to false to remove default behavior - -- You can add custom keymaps here as well (anything vim.keymap.set accepts) - bindings = { - i = { - [""] = "Submit", - }, - n = { - [""] = "Submit", - [""] = "Submit", - ["?"] = "ShowHelp", - }, - }, - }, - task_editor = { - -- Set keymap to false to remove default behavior - -- You can add custom keymaps here as well (anything vim.keymap.set accepts) - bindings = { - i = { - [""] = "NextOrSubmit", - [""] = "Submit", - [""] = "Next", - [""] = "Prev", - }, - n = { - [""] = "NextOrSubmit", - [""] = "Submit", - [""] = "Next", - [""] = "Prev", - ["?"] = "ShowHelp", - }, - }, - }, - -- Configure the floating window used for confirmation prompts - confirm = { - border = "rounded", - zindex = 40, - -- Dimensions can be integers or a float between 0 and 1 (e.g. 0.4 for 40%) - -- min_X and max_X can be a single value or a list of mixed integer/float types. - min_width = 80, - max_width = 0.5, - width = nil, - min_height = 10, - max_height = 0.9, - height = nil, - -- Set any window options here (e.g. winhighlight) - win_opts = { - winblend = 10, - }, - }, - -- Configuration for task floating windows - task_win = { - -- How much space to leave around the floating window - padding = 2, - border = "rounded", - -- Set any window options here (e.g. winhighlight) - win_opts = { - winblend = 10, - }, - }, - -- Aliases for bundles of components. Redefine the builtins, or create your own. - component_aliases = { - -- Most tasks are initialized with the default components - default = { - "on_output_summarize", - "on_exit_set_status", - "on_complete_notify", - "on_complete_dispose", - }, - -- Tasks from tasks.json use these components - default_vscode = { - "default", - "on_result_diagnostics", - "on_result_diagnostics_quickfix", - }, - }, - -- This is run before creating tasks from a template - pre_task_hook = function(task_defn, util) - -- util.add_component(task_defn, "on_result_diagnostics", {"timeout", timeout = 20}) - -- util.remove_component(task_defn, "on_complete_dispose") - -- task_defn.env = { MY_VAR = 'value' } - end, - -- A list of components to preload on setup. - -- Only matters if you want them to show up in the task editor. - preload_components = {}, - -- Controls when the parameter prompt is shown when running a template - -- always Show when template has any params - -- missing Show when template has any params not explicitly passed in - -- allow Only show when a required param is missing - -- never Never show prompt (error if required param missing) - default_template_prompt = "allow", - -- Configure where the logs go and what level to use - -- Types are "echo", "notify", and "file" - log = { - { - type = "echo", - level = vim.log.levels.WARN, - }, - { - type = "file", - filename = "overseer.log", - level = vim.log.levels.WARN, - }, - }, -}) diff --git a/nvim/plugin/sneak-setting.lua b/nvim/plugin/sneak-setting.lua deleted file mode 100644 index 554c2b0..0000000 --- a/nvim/plugin/sneak-setting.lua +++ /dev/null @@ -1,12 +0,0 @@ -vim.cmd [[ -let g:sneak#label = 1 - " 2-character Sneak (default) - nmap cl Sneak_s - nmap cL Sneak_S - " visual-mode - xmap ? Sneak_s - xmap ? Sneak_S - " operator-pending-mode - omap ? Sneak_s - omap ? Sneak_S -]] diff --git a/nvim/plugin/telescope-settings.lua b/nvim/plugin/telescope-settings.lua deleted file mode 100644 index b4dd6dc..0000000 --- a/nvim/plugin/telescope-settings.lua +++ /dev/null @@ -1,24 +0,0 @@ -local tBuiltIn = require 'telescope.builtin' -require('telescope').setup { - extensions = { - ["ui-select"] = { - entry_maker = require("telescope.themes").get_dropdown - }, - defaults = { - file_ignore_patterns = { - "node_modules" - } - } - } -} -vim.keymap.set('n', 'ff', tBuiltIn.find_files, {}) -vim.keymap.set('n', 'fg', tBuiltIn.grep_string, {}) -vim.keymap.set('n', 'fb', tBuiltIn.buffers, {}) -vim.keymap.set('n', 'fh', tBuiltIn.help_tags, {}) -vim.keymap.set('n', 'fk', tBuiltIn.keymaps, {}) - -vim.keymap.set('n', 'gws', ':Telescope git_worktree git_worktrees') -vim.keymap.set('n', 'gwc', ':Telescope git_worktree create_git_worktree') - - -require("telescope").load_extension("ui-select") diff --git a/nvim/plugin/tree-sitter-context-settings.lua b/nvim/plugin/tree-sitter-context-settings.lua deleted file mode 100644 index f0f25b9..0000000 --- a/nvim/plugin/tree-sitter-context-settings.lua +++ /dev/null @@ -1,14 +0,0 @@ -require 'treesitter-context'.setup { - enable = true, -- Enable this plugin (Can be enabled/disabled later via commands) - max_lines = 0, -- How many lines the window should span. Values <= 0 mean no limit. - min_window_height = 0, -- Minimum editor window height to enable context. Values <= 0 mean no limit. - line_numbers = true, - multiline_threshold = 20, -- Maximum number of lines to show for a single context - trim_scope = 'outer', -- Which context lines to discard if `max_lines` is exceeded. Choices: 'inner', 'outer' - mode = 'cursor', -- Line used to calculate context. Choices: 'cursor', 'topline' - -- Separator between context and content. Should be a single character string, like '-'. - -- When separator is set, the context will only show up when there are at least 2 lines above cursorline. - separator = nil, - zindex = 20, -- The Z-index of the context window - on_attach = nil, -- (fun(buf: integer): boolean) return false to disable attaching -} diff --git a/nvim/plugin/tree-sitter-settings.lua b/nvim/plugin/tree-sitter-settings.lua deleted file mode 100644 index ca0c3c6..0000000 --- a/nvim/plugin/tree-sitter-settings.lua +++ /dev/null @@ -1,61 +0,0 @@ -vim.cmd [[ - set foldmethod=expr - set foldexpr=nvim_treesitter#foldexpr() -]] -require 'nvim-treesitter.configs'.setup { - incremental_selection = { - enable = true, - keymaps = { - init_selection = "gnn", - node_incremental = "grn", - scope_incremental = "grc", - node_decremental = "grm", - }, - }, - -- A list of parser names, or "all" - ensure_installed = { "c", "lua", "rust", "haskell", "typescript", "zig" }, - - -- Install parsers synchronously (only applied to `ensure_installed`) - sync_install = false, - - -- Automatically install missing parsers when entering buffer - auto_install = true, - - -- List of parsers to ignore installing (for "all") - ignore_install = { "javascript" }, - - ---- If you need to change the installation directory of the parsers (see -> Advanced Setup) - -- parser_install_dir = "/some/path/to/store/parsers", -- Remember to run vim.opt.runtimepath:append("/some/path/to/store/parsers")! - - indent = { - enable = true, - }, - highlight = { - -- `false` will disable the whole extension - enable = true, - - -- NOTE: these are the names of the parsers and not the filetype. (for example if you want to - -- disable highlighting for the `tex` filetype, you need to include `latex` in this list as this is - -- the name of the parser) - -- list of language that will be disabled - disable = { "c", "rust" }, - - -- Setting this to true will run `:h syntax` and tree-sitter at the same time. - -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation). - -- Using this option may slow down your editor, and you may see some duplicate highlights. - -- Instead of true it can also be a list of languages - additional_vim_regex_highlighting = false, - }, -} - --- local parser_config = require 'nvim-treesitter.parsers'.get_parser_configs() --- parser_config.powershell = { --- install_info = { --- url = "~/sources/tree-sitter-PowerShell", --- files = { "src/parser.c" }, --- branch = "operator001", --- generate_requires_npm = false, --- requires_generate_from_grammar = false, --- }, --- filetype = "ps1", --- } diff --git a/nvim/plugin/treesitter-context.lua.backup b/nvim/plugin/treesitter-context.lua.backup deleted file mode 100644 index 0796b0b..0000000 --- a/nvim/plugin/treesitter-context.lua.backup +++ /dev/null @@ -1,18 +0,0 @@ - require('nvim-treesitter-context').setup() { - enable = true, - throttle = true, - max_lines = 0, - patterns = { - default = { - 'class', - 'function', - 'method', - }, - }, - trim_scope = { - ['function'] = true, - }, - separator = ' > ', - zindex = 20, - on_attach = nil - } \ No newline at end of file diff --git a/nvim/plugin/undo-tree-settings.lua b/nvim/plugin/undo-tree-settings.lua deleted file mode 100644 index aa1e4c5..0000000 --- a/nvim/plugin/undo-tree-settings.lua +++ /dev/null @@ -1 +0,0 @@ -vim.keymap.set('n', 'u', ':UndotreeToggle') diff --git a/nvim/plugin/vsnip-settings.vim b/nvim/plugin/vsnip-settings.vim deleted file mode 100644 index c7c8eaf..0000000 --- a/nvim/plugin/vsnip-settings.vim +++ /dev/null @@ -1,25 +0,0 @@ -" Expand -imap vsnip#expandable() ? '(vsnip-expand)' : '' -smap vsnip#expandable() ? '(vsnip-expand)' : '' - -" Expand or jump -imap vsnip#available(1) ? '(vsnip-expand-or-jump)' : '' -smap vsnip#available(1) ? '(vsnip-expand-or-jump)' : '' - -" Jump forward or backward -imap vsnip#jumpable(1) ? '(vsnip-jump-next)' : '' -smap vsnip#jumpable(1) ? '(vsnip-jump-next)' : '' -imap vsnip#jumpable(-1) ? '(vsnip-jump-prev)' : '' -smap vsnip#jumpable(-1) ? '(vsnip-jump-prev)' : '' - -" Select or cut text to use as $TM_SELECTED_TEXT in the next snippet. -" See https://github.com/hrsh7th/vim-vsnip/pull/50 -" nmap s (vsnip-select-text) -" xmap s (vsnip-select-text) -" nmap S (vsnip-cut-text) -" xmap S (vsnip-cut-text) - -" If you want to use snippet for multiple filetypes, you can `g:vsnip_filetypes` for it. -let g:vsnip_filetypes = {} -let g:vsnip_filetypes.javascriptreact = ['javascript'] -let g:vsnip_filetypes.typescriptreact = ['typescript'] diff --git a/nvim/plugin/zenmode.lua b/nvim/plugin/zenmode.lua deleted file mode 100644 index d21adfd..0000000 --- a/nvim/plugin/zenmode.lua +++ /dev/null @@ -1 +0,0 @@ -vim.keymap.set('n','zz', ":ZenMode")