more preconfigured plugins

This commit is contained in:
christianchiarulli 2021-06-28 16:28:32 -04:00
parent 5363aa6306
commit 8004706d95
6 changed files with 183 additions and 62 deletions

View file

@ -33,10 +33,26 @@ O = {
matchup = {active = false},
colorizer = {active = false},
numb = {active = false},
zen = {active = false},
ts_playground = {active = false},
indent_line = {active = false},
ts_context_commentstring = {active = false}
ts_context_commentstring = {active = false},
symbol_outline = {active = false},
debug = {active = false},
bqf = {active = false},
trouble = {active = false},
floatterm = {active = false},
spectre = {active = false},
lsp_rooter = {active = false},
markdown_preview = {active = false},
codi = {active = false},
telescope_fzy = {active = false},
sanegx = {active = false},
todo_comments = {active = false},
lsp_colors = {active = false},
git_blame = {active = false},
gitlinker = {active = false},
telescope_project = {active = false}
},

View file

@ -1,13 +1,17 @@
local actions = require('telescope.actions')
-- local trouble = require("trouble.providers.telescope")
-- if O.plugin.trouble.active then
-- local trouble = require("trouble.providers.telescope")
-- end
-- Global remapping
------------------------------
-- '--color=never',
require('telescope').setup {
defaults = {
find_command = {'rg', '--no-heading', '--with-filename', '--line-number', '--column', '--smart-case'},
find_command = {
'rg', '--no-heading', '--with-filename', '--line-number',
'--column', '--smart-case'
},
prompt_position = "bottom",
-- prompt_prefix = " ",
prompt_prefix = "",
selection_caret = "",
entry_prefix = " ",
@ -15,7 +19,10 @@ require('telescope').setup {
selection_strategy = "reset",
sorting_strategy = "descending",
layout_strategy = "horizontal",
layout_defaults = {horizontal = {mirror = false}, vertical = {mirror = false}},
layout_defaults = {
horizontal = {mirror = false},
vertical = {mirror = false}
},
file_sorter = require'telescope.sorters'.get_fzy_sorter,
file_ignore_patterns = {},
generic_sorter = require'telescope.sorters'.get_generic_fuzzy_sorter,
@ -66,7 +73,12 @@ require('telescope').setup {
}
}
},
extensions = {fzy_native = {override_generic_sorter = false, override_file_sorter = true}}
extensions = {
fzy_native = {
override_generic_sorter = false,
override_file_sorter = true
}
}
}
-- require'telescope'.load_extension('project')

View file

@ -87,7 +87,7 @@
":lua require'telescope'.extensions.project.project{}<CR>",
{noremap = true, silent = true})
vim.api.nvim_set_keymap("n", "<leader>z", ":TZAtaraxis<CR>",
vim.api.nvim_set_keymap("n", "<leader>z", ":ZenMode<CR>",
{noremap = true, silent = true})
-- z = {"<cmd>TZAtaraxis<cr>", "toggle zen"}
@ -102,6 +102,7 @@
["h"] = "No Highlight",
["p"] = "Projects",
["z"] = "Zen",
["gy"] = "Gitlink",
[";"] = "Dashboard",
b = {
name = "+Buffers",

View file

@ -57,9 +57,7 @@ return require("packer").startup(function(use)
}
-- whichkey
use {
"folke/which-key.nvim",
}
use {"folke/which-key.nvim"}
-- Autopairs
use {"windwp/nvim-autopairs"}
@ -130,19 +128,19 @@ return require("packer").startup(function(use)
disable = not O.plugin.dashboard.active,
opt = true
}
-- Zen Mode TODO this don't work with whichkey might gave to make this built in, may have to replace with folke zen
use {
"Pocco81/TrueZen.nvim",
-- event = 'BufEnter',
cmd = {"TZAtaraxis"},
"folke/zen-mode.nvim",
cmd = "ZenMode",
config = function()
require('lv-zen').config()
end
-- event = "BufEnter"
-- disable = not O.plugin.zen.active,
require("zen-mode").setup {
-- your configuration comes here
-- or leave it empty to use the default settings
-- refer to the configuration section below
}
end,
disable = not O.plugin.zen.active,
}
-- matchup
use {
'andymass/vim-matchup',
@ -150,8 +148,7 @@ return require("packer").startup(function(use)
config = function()
require('lv-matchup').config()
end,
disable = not O.plugin.matchup.active,
opt = true
disable = not O.plugin.matchup.active
}
use {
@ -203,61 +200,154 @@ return require("packer").startup(function(use)
disable = not O.plugin.indent_line.active
}
-- comments in context
use {
'JoosepAlviste/nvim-ts-context-commentstring',
event = "BufRead",
disable = not O.plugin.ts_context_commentstring.active
}
-- use {"nvim-telescope/telescope-fzy-native.nvim", opt = true}
-- use {"nvim-telescope/telescope-project.nvim", opt = true}
-- -- comments in context
-- -- Git extras
-- Git
-- use {'tpope/vim-fugitive', opt = true}
-- use {'tpope/vim-rhubarb', opt = true}
-- pwntester/octo.nvim
-- Symbol Outline
use {
'simrat39/symbols-outline.nvim',
cmd = 'SymbolsOutline',
disable = not O.plugin.symbol_outline.active
}
-- diagnostics
use {
"folke/trouble.nvim",
cmd = 'TroubleToggle',
disable = not O.plugin.trouble.active
}
-- Debugging
use {
"mfussenegger/nvim-dap",
event = "BufRead",
disable = not O.plugin.debug.active
}
-- Better quickfix
use {
"kevinhwang91/nvim-bqf",
event = "BufRead",
disable = not O.plugin.bqf.active
}
-- Floating terminal
use {
'numToStr/FTerm.nvim',
event = "BufRead",
config = function()
require'FTerm'.setup({
dimensions = {height = 0.8, width = 0.8, x = 0.5, y = 0.5},
border = 'single' -- or 'double'
})
end,
disable = not O.plugin.floatterm.active
}
-- Search & Replace
use {
'windwp/nvim-spectre',
event = "BufRead",
config = function()
require('spectre').setup()
end,
disable = not O.plugin.spectre.active
}
-- lsp root with this nvim-tree will follow you
use {
"ahmedkhalf/lsp-rooter.nvim",
event = "BufRead",
config = function()
require("lsp-rooter").setup()
end,
disable = not O.plugin.lsp_rooter.active
}
-- Markdown preview
use {
'iamcco/markdown-preview.nvim',
run = 'cd app && npm install',
ft = 'markdown',
disable = not O.plugin.markdown_preview.active
}
-- Interactive scratchpad
use {
'metakirby5/codi.vim',
cmd = 'Codi',
disable = not O.plugin.codi.active
}
-- Use fzy for telescope
use {
"nvim-telescope/telescope-fzy-native.nvim",
event = "BufRead",
disable = not O.plugin.telescope_fzy.active
}
-- Use project for telescope
use {
"nvim-telescope/telescope-project.nvim",
event = "BufRead",
disable = not O.plugin.telescope_project.active
}
-- Sane gx for netrw_gx bug
use {
"felipec/vim-sanegx",
event = "BufRead",
disable = not O.plugin.sanegx.active
}
-- Sane gx for netrw_gx bug
use {
"folke/todo-comments.nvim",
event = "BufRead",
disable = not O.plugin.todo_comments.active
}
-- LSP Colors
use {
"folke/lsp-colors.nvim",
event = "BufRead",
disable = not O.plugin.lsp_colors.active
}
-- Git Blame
use {
"f-person/git-blame.nvim",
event = "BufRead",
disable = not O.plugin.git_blame.active
}
use {
'ruifm/gitlinker.nvim',
event = "BufRead",
config = function()
require"gitlinker".setup({
opts = {
-- remote = 'github', -- force the use of a specific remote
-- adds current line nr in the url for normal mode
add_current_line_on_normal_mode = true,
-- callback for what to do with the url
action_callback = require"gitlinker.actions".open_in_browser,
-- print the url after performing the action
print_url = false,
-- mapping to call url generation
mappings = "<leader>gy"
}
})
end,
disable = not O.plugin.gitlinker.active,
requires = 'nvim-lua/plenary.nvim'
}
-- Git
-- https://github.com/kdheepak/lazygit.nvim
-- pwntester/octo.nvim
-- use 'sindrets/diffview.nvim'
-- Easily Create Gists
-- use {'mattn/vim-gist', opt = true}
-- use {'mattn/webapi-vim', opt = true}
-- use {'f-person/git-blame.nvim', opt = true}
-- -- diagnostics
-- use {"folke/trouble.nvim", opt = true}
-- -- Debugging
-- use {"mfussenegger/nvim-dap", opt = true}
-- -- Better quickfix
-- use {"kevinhwang91/nvim-bqf", opt = true}
-- -- Search & Replace
-- use {'windwp/nvim-spectre', opt = true}
-- -- Symbol Outline
-- use {'simrat39/symbols-outline.nvim', opt = true}
-- -- Interactive scratchpad
-- use {'metakirby5/codi.vim', opt = true}
-- -- Markdown preview
-- use {
-- 'iamcco/markdown-preview.nvim',
-- run = 'cd app && npm install',
-- opt = true
-- }
-- -- Floating terminal
-- use {'numToStr/FTerm.nvim', opt = true}
-- -- Sane gx for netrw_gx bug
-- use {"felipec/vim-sanegx", opt = true}
-- lsp root
-- use {"ahmedkhalf/lsp-rooter.nvim", opt = true} -- with this nvim-tree will follow you
-- -- Latex TODO what filetypes should this be active for?
-- use {"lervag/vimtex", opt = true}
-- Extras
-- Not sure yet
-- HTML preview
-- use {
-- 'turbio/bracey.vim',
-- run = 'npm install --prefix server',
-- opt = true
-- }
-- folke/todo-comments.nvim
-- gennaro-tedesco/nvim-jqx
-- TimUntersberger/neogit
-- folke/lsp-colors.nvim
-- Latex TODO what filetypes should this be active for?
-- use {"lervag/vimtex", opt = true}
end)