before lunarvim

This commit is contained in:
Fernando Bueno 2023-07-02 00:30:19 -04:00
parent 6967424521
commit 70ab54c5d7
7 changed files with 323 additions and 5 deletions

View file

@ -0,0 +1,30 @@
return {
"windwp/nvim-autopairs",
config = function()
require("nvim-autopairs").setup {
check_ts = true, -- enable treesitter
ts_config = {
lua = { "string" }, -- don't add pairs in lua string treesitter nodes
javascript = { "template_string" }, -- don't add pairs in javscript template_string treesitter nodes
java = false, -- don't check treesitter on java
},
}
-- make autopairs and completion work together
-- import nvim-autopairs completion functionality safely
local cmp_autopairs_setup, cmp_autopairs = pcall(require, "nvim-autopairs.completion.cmp")
if not cmp_autopairs_setup then
return
end
-- import nvim-cmp plugin safely (completions plugin)
local cmp_setup, cmp = pcall(require, "cmp")
if not cmp_setup then
return
end
-- make autopairs and completion work together
cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done())
end,
}

View file

@ -1,5 +1,28 @@
-- You can add your own plugins here or in other files in this directory!
-- I promise not to create any merge conflicts in this directory :)
--
-- See the kickstart.nvim README for more information
return {}
require("custom.core.keymaps")
require("custom.core.options")
return {
'nvim-lua/popup.nvim',
'christoomey/vim-tmux-navigator',
'szw/vim-maximizer', -- maximizes and restores current window
'tpope/vim-surround', -- add, delete, change surroundings (it's awesome)
'vim-scripts/ReplaceWithRegister', -- replace with register contents using motion (gr + motion)
'kyazdani42/nvim-web-devicons', -- vs-code like icons
'hrsh7th/cmp-buffer', -- source for text in buffer,
'hrsh7th/cmp-path', -- source for file system paths
'rafamadriz/friendly-snippets', -- useful snippets
{ "glepnir/lspsaga.nvim", branch = "main" }, -- enhanced lsp uis
'jose-elias-alvarez/typescript.nvim', -- additional functionality for typescript server (e.g. rename file & update imports)
'onsails/lspkind.nvim', -- vs-code like icons for autocompletion
'jose-elias-alvarez/null-ls.nvim', -- configure formatters & linters
'jayp0521/mason-null-ls.nvim', -- bridges gap b/w mason & null-ls
{ "windwp/nvim-ts-autotag", after = "nvim-treesitter" }, -- autoclose tags
'fedepujol/move.nvim', -- move line/block up/down
'ThePrimeagen/harpoon', -- the name is... ThePrimeagen
'MattesGroeger/vim-bookmarks', -- vim-bookmarks
'tom-anders/telescope-vim-bookmarks.nvim', -- telescope-vim-bookmarks
'tpope/vim-unimpaired', -- vim-unimpared
-- 'nvim-telescope/telescope-media-files.nvim',
'nvim-telescope/telescope-ui-select.nvim',
'nvim-telescope/telescope-file-browser.nvim',
}

View file

@ -0,0 +1,6 @@
return {
'ggandor/leap.nvim',
config = function()
require('leap').add_default_mappings()
end,
}

View file

@ -0,0 +1,19 @@
-- Unless you are still migrating, remove the deprecated commands from v1.x
vim.cmd([[ let g:neo_tree_remove_legacy_commands = 1 ]])
return {
"nvim-neo-tree/neo-tree.nvim",
version = "*",
dependencies = {
"nvim-lua/plenary.nvim",
-- "nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
"MunifTanjim/nui.nvim",
},
keys = {
{ "<leader>o", ":Neotree toggle<cr>", desc = "NeoTree", silent = true },
},
config = function ()
require('neo-tree').setup {
}
end,
}

View file

@ -0,0 +1,110 @@
return {
'nvim-telescope/telescope.nvim',
version = '*',
dependencies = { 'nvim-lua/plenary.nvim' },
cmd = { 'Telescope' },
config = function()
local actions = require "telescope.actions"
require('telescope').setup {
defaults = {
path_display = { "smart" },
mappings = {
i = {
["<C-n>"] = actions.cycle_history_next,
["<C-p>"] = actions.cycle_history_prev,
["<C-j>"] = actions.move_selection_next,
["<C-k>"] = actions.move_selection_previous,
["<C-c>"] = actions.close,
["<Down>"] = actions.move_selection_next,
["<Up>"] = actions.move_selection_previous,
["<CR>"] = actions.select_default,
["<C-x>"] = actions.select_horizontal,
["<C-v>"] = actions.select_vertical,
["<C-t>"] = actions.select_tab,
["<C-u>"] = actions.preview_scrolling_up,
["<C-d>"] = actions.preview_scrolling_down,
["<PageUp>"] = actions.results_scrolling_up,
["<PageDown>"] = actions.results_scrolling_down,
["<Tab>"] = actions.toggle_selection + actions.move_selection_worse,
["<S-Tab>"] = actions.toggle_selection + actions.move_selection_better,
["<C-q>"] = actions.send_to_qflist + actions.open_qflist,
["<M-q>"] = actions.send_selected_to_qflist + actions.open_qflist,
["<C-l>"] = actions.complete_tag,
["<C-_>"] = actions.which_key, -- keys from pressing <C-/>
},
n = {
["<esc>"] = actions.close,
["<CR>"] = actions.select_default,
["<C-x>"] = actions.select_horizontal,
["<C-v>"] = actions.select_vertical,
["<C-t>"] = actions.select_tab,
["<Tab>"] = actions.toggle_selection + actions.move_selection_worse,
["<S-Tab>"] = actions.toggle_selection + actions.move_selection_better,
["<C-q>"] = actions.send_to_qflist + actions.open_qflist,
["<M-q>"] = actions.send_selected_to_qflist + actions.open_qflist,
["j"] = actions.move_selection_next,
["k"] = actions.move_selection_previous,
["H"] = actions.move_to_top,
["M"] = actions.move_to_middle,
["L"] = actions.move_to_bottom,
["<Down>"] = actions.move_selection_next,
["<Up>"] = actions.move_selection_previous,
["gg"] = actions.move_to_top,
["G"] = actions.move_to_bottom,
["<C-u>"] = actions.preview_scrolling_up,
["<C-d>"] = actions.preview_scrolling_down,
["<PageUp>"] = actions.results_scrolling_up,
["<PageDown>"] = actions.results_scrolling_down,
["?"] = actions.which_key,
},
},
},
pickers = {
-- Default configuration for builtin pickers goes here:
-- picker_name = {
-- picker_config_key = value,
-- ...
-- }
-- Now the picker_config_key will be applied every time you call this
-- builtin picker
},
extensions = {
file_browser = {
-- theme = "ivy",
-- require("telescope.themes").get_dropdown {
-- previewer = false,
-- -- even more opts
-- },
mappings = {
["i"] = {
-- your custom insert mode mappings
},
["n"] = {
-- your custom normal mode mappings
},
},
},
["ui-select"] = {
require("telescope.themes").get_dropdown {
previewer = false,
-- even more opts
},
},
},
}
end,
}