summaryrefslogtreecommitdiff
path: root/public/nvim/.nvim/lua/plugins/core
diff options
context:
space:
mode:
authorChristian Segundo2024-01-20 23:56:23 +0100
committerChristian Segundo2024-01-20 23:56:23 +0100
commite62c2c3c95855232f0211459966a45a098f46a43 (patch)
tree15b8b4d03804d992c1f233b7d2ed41c06c332caa /public/nvim/.nvim/lua/plugins/core
parent31f926041eb5e27f6b4d139d43149fa848371e5c (diff)
downloaddotfiles-master.tar.gz
mass exodusHEADmaster
Diffstat (limited to 'public/nvim/.nvim/lua/plugins/core')
-rw-r--r--public/nvim/.nvim/lua/plugins/core/auto-session.lua6
-rw-r--r--public/nvim/.nvim/lua/plugins/core/gitsigns.lua8
-rw-r--r--public/nvim/.nvim/lua/plugins/core/luasnip.lua50
-rw-r--r--public/nvim/.nvim/lua/plugins/core/nerdcommenter.lua18
-rw-r--r--public/nvim/.nvim/lua/plugins/core/nvim-tree.lua36
-rw-r--r--public/nvim/.nvim/lua/plugins/core/tabline.lua3
-rw-r--r--public/nvim/.nvim/lua/plugins/core/telescope.lua27
-rw-r--r--public/nvim/.nvim/lua/plugins/core/tmux.lua13
-rw-r--r--public/nvim/.nvim/lua/plugins/core/treesitter.lua54
-rw-r--r--public/nvim/.nvim/lua/plugins/core/which-key.lua45
10 files changed, 0 insertions, 260 deletions
diff --git a/public/nvim/.nvim/lua/plugins/core/auto-session.lua b/public/nvim/.nvim/lua/plugins/core/auto-session.lua
deleted file mode 100644
index 9bfcac0..0000000
--- a/public/nvim/.nvim/lua/plugins/core/auto-session.lua
+++ /dev/null
@@ -1,6 +0,0 @@
-return {
- "rmagatti/auto-session",
- config = function()
- require("auto-session").setup({ log_level = "info" })
- end,
-}
diff --git a/public/nvim/.nvim/lua/plugins/core/gitsigns.lua b/public/nvim/.nvim/lua/plugins/core/gitsigns.lua
deleted file mode 100644
index e856855..0000000
--- a/public/nvim/.nvim/lua/plugins/core/gitsigns.lua
+++ /dev/null
@@ -1,8 +0,0 @@
-return {
- "lewis6991/gitsigns.nvim",
- event = { "BufRead" },
- config = function()
- require("gitsigns").setup()
- end,
- dependencies = { "nvim-lua/plenary.nvim" },
-}
diff --git a/public/nvim/.nvim/lua/plugins/core/luasnip.lua b/public/nvim/.nvim/lua/plugins/core/luasnip.lua
deleted file mode 100644
index 622af58..0000000
--- a/public/nvim/.nvim/lua/plugins/core/luasnip.lua
+++ /dev/null
@@ -1,50 +0,0 @@
-return {
- {
- "L3MON4D3/LuaSnip",
- dependencies = { "rafamadriz/friendly-snippets" },
- build = "make install_jsregexp",
- config = function()
- local ls = require("luasnip")
- local types = require("luasnip.util.types")
-
- ls.config.set_config({
- history = true,
- updateevents = "TextChanged,TextChangedI",
- enable_autosnippets = true,
- ext_opts = {
- [types.choiceNode] = {
- active = {
- virt_text = { { "<-", "Error" } },
- },
- },
- },
- })
-
- -- luasnip keymaps are defined as cmp keymaps
-
- vim.keymap.set(
- "n",
- "<leader><leader>s",
- '<cmd>lua require("luasnip.loaders.from_lua").load({ paths = "~/.config/nvim/lua/snippets" })<CR>'
- )
-
- require("luasnip.loaders.from_lua").lazy_load({ paths = "~/.config/nvim/lua/snippets" })
- end,
- },
-
- -- VSCode like (JSON) snippets
- -- For the full list of supported languages see:
- -- https://github.com/rafamadriz/friendly-snippets/blob/main/package.json
- {
- "rafamadriz/friendly-snippets",
- opts = { include = {} },
- config = function(_, opts)
- if #opts.include == 0 then
- return
- end
-
- opts.path = "~/.local/share/nvim/lazy/friendly-snippets"
- require("luasnip.loaders.from_vscode").lazy_load(opts)
- end,
- },
-}
diff --git a/public/nvim/.nvim/lua/plugins/core/nerdcommenter.lua b/public/nvim/.nvim/lua/plugins/core/nerdcommenter.lua
deleted file mode 100644
index 720b3d2..0000000
--- a/public/nvim/.nvim/lua/plugins/core/nerdcommenter.lua
+++ /dev/null
@@ -1,18 +0,0 @@
-return {
- "preservim/nerdcommenter",
- init = function()
- vim.g.NERDCreateDefaultMappings = 0
- end,
- config = function()
- vim.api.nvim_set_keymap("v", "<leader>cc", "<plug>NERDCommenterComment", { silent = true })
- vim.api.nvim_set_keymap("v", "<leader>cu", "<plug>NERDCommenterUncomment", { silent = true })
- vim.api.nvim_set_keymap("n", "<leader>cc", "<plug>NERDCommenterComment", { noremap = false, silent = true })
- vim.api.nvim_set_keymap("n", "<leader>cu", "<plug>NERDCommenterUncomment", { noremap = false, silent = true })
- end,
- keys = {
- { "<leader>cc", mode = "v" },
- { "<leader>cc", mode = "n" },
- { "<leader>cu", mode = "v" },
- { "<leader>cu", mode = "n" },
- },
-}
diff --git a/public/nvim/.nvim/lua/plugins/core/nvim-tree.lua b/public/nvim/.nvim/lua/plugins/core/nvim-tree.lua
deleted file mode 100644
index e8ca82f..0000000
--- a/public/nvim/.nvim/lua/plugins/core/nvim-tree.lua
+++ /dev/null
@@ -1,36 +0,0 @@
-return {
- {
- "nvim-tree/nvim-tree.lua",
- config = function()
- require("nvim-tree").setup({
- sync_root_with_cwd = false,
- update_focused_file = {
- enable = true,
- update_root = false,
- },
- renderer = {
- indent_markers = { enable = true },
- highlight_git = true,
- highlight_opened_files = "all",
- },
- })
- end,
- dependencies = { "nvim-tree/nvim-web-devicons" },
- },
-
- -- Add nvim-tree which-key shortcuts
- {
- "folke/which-key.nvim",
- opts = function(_, opts)
- if type(opts) ~= "table" then
- opts = {}
- end
-
- if type(opts.f) ~= "table" then
- opts["f"] = {}
- end
-
- opts.f["e"] = { "<cmd>NvimTreeToggle<cr>", "Explorer" }
- end,
- },
-}
diff --git a/public/nvim/.nvim/lua/plugins/core/tabline.lua b/public/nvim/.nvim/lua/plugins/core/tabline.lua
deleted file mode 100644
index 0a8305d..0000000
--- a/public/nvim/.nvim/lua/plugins/core/tabline.lua
+++ /dev/null
@@ -1,3 +0,0 @@
-return {
- "mkitt/tabline.vim",
-}
diff --git a/public/nvim/.nvim/lua/plugins/core/telescope.lua b/public/nvim/.nvim/lua/plugins/core/telescope.lua
deleted file mode 100644
index 367e20c..0000000
--- a/public/nvim/.nvim/lua/plugins/core/telescope.lua
+++ /dev/null
@@ -1,27 +0,0 @@
-return {
- {
- "nvim-telescope/telescope.nvim",
- config = function()
- require("telescope").load_extension("file_browser")
- end,
- dependencies = {
- "nvim-lua/plenary.nvim",
- "nvim-telescope/telescope-file-browser.nvim",
- },
- },
-
- {
- "folke/which-key.nvim",
- opts = function(_, opts)
- if type(opts) == "table" then
- opts.b = opts.b or {}
- opts.f = opts.f or {}
-
- opts.b["b"] = { "<cmd>Telescope buffers<cr>", "All" }
- opts.f["f"] = { "<cmd>Telescope find_files<cr>", "Find" }
- opts.f["g"] = { "<cmd>Telescope live_grep<cr>", "Grep" }
- opts.f["b"] = { "<cmd>Telescope file_browser<cr>", "Browse" }
- end
- end,
- },
-}
diff --git a/public/nvim/.nvim/lua/plugins/core/tmux.lua b/public/nvim/.nvim/lua/plugins/core/tmux.lua
deleted file mode 100644
index 0d63aa4..0000000
--- a/public/nvim/.nvim/lua/plugins/core/tmux.lua
+++ /dev/null
@@ -1,13 +0,0 @@
-return {
- "christoomey/vim-tmux-navigator",
- config = function()
- local nvim_set_keymap = vim.api.nvim_set_keymap
- vim.g.tmux_navigator_no_mappings = 1
- for _, mode in pairs({ "n", "v", "i", "t" }) do
- nvim_set_keymap(mode, "<C-j>", "<cmd>:TmuxNavigateDown<CR>", { noremap = true })
- nvim_set_keymap(mode, "<C-k>", "<cmd>:TmuxNavigateUp<CR>", { noremap = true })
- nvim_set_keymap(mode, "<C-h>", "<cmd>:TmuxNavigateLeft<CR>", { noremap = true })
- nvim_set_keymap(mode, "<C-l>", "<cmd>:TmuxNavigateRight<CR>", { noremap = true })
- end
- end,
-}
diff --git a/public/nvim/.nvim/lua/plugins/core/treesitter.lua b/public/nvim/.nvim/lua/plugins/core/treesitter.lua
deleted file mode 100644
index 3818555..0000000
--- a/public/nvim/.nvim/lua/plugins/core/treesitter.lua
+++ /dev/null
@@ -1,54 +0,0 @@
----@param tbl table
----@return table
-local tbl_uniq = function(tbl)
- ---@type table<string, boolean>
- local added = {}
- local res = {}
- res = vim.tbl_filter(function(k)
- if added[k] then
- return false
- end
- added[k] = true
- return true
- end, tbl)
-
- return res
-end
-
-return {
- {
- "nvim-treesitter/nvim-treesitter",
- build = ":TSUpdate",
- cmd = { "TSUpdateSync" },
- event = { "BufReadPost", "BufNewFile" },
- init = function()
- vim.o.foldmethod = "expr"
- vim.o.foldexpr = "nvim_treesitter#foldexpr()"
- end,
- opts = {
- ensure_installed = { "query" },
- ignore_install = {},
- highlight = {
- enable = true,
- },
- query_linter = {
- enable = true,
- use_virtual_text = true,
- lint_events = { "BufWrite", "CursorHold" },
- },
- },
- config = function(_, opts)
- if type(opts.ensure_installed) == "table" then
- opts.ensure_installed = tbl_uniq(opts.ensure_installed)
- end
- require("nvim-treesitter.configs").setup(opts)
- end,
- },
-
- {
- "nvim-treesitter/playground",
- build = ":TSInstall query",
- dependencies = { "nvim-treesitter" },
- cmd = { "TSPlaygroundToggle" },
- },
-}
diff --git a/public/nvim/.nvim/lua/plugins/core/which-key.lua b/public/nvim/.nvim/lua/plugins/core/which-key.lua
deleted file mode 100644
index 6e046a3..0000000
--- a/public/nvim/.nvim/lua/plugins/core/which-key.lua
+++ /dev/null
@@ -1,45 +0,0 @@
-return {
- "folke/which-key.nvim",
- event = "VeryLazy",
- init = function()
- vim.o.timeout = true
- vim.o.timeoutlen = 300
- end,
-
- opts = {
- f = { name = "File" },
- b = {
- name = "Buffer",
- n = { "<cmd>BufferNext<cr>", "Next" },
- p = { "<cmd>BufferPrevious<cr>", "Previous" },
- c = { "<cmd>BufferClose<cr>", "Close" },
- ["1"] = { "<cmd>BufferGoto 1<cr>", "1" },
- ["2"] = { "<cmd>BufferGoto 2<cr>", "2" },
- ["3"] = { "<cmd>BufferGoto 3<cr>", "3" },
- ["4"] = { "<cmd>BufferGoto 4<cr>", "4" },
- ["5"] = { "<cmd>BufferGoto 5<cr>", "5" },
- ["6"] = { "<cmd>BufferGoto 6<cr>", "6" },
- ["7"] = { "<cmd>BufferGoto 7<cr>", "7" },
- ["8"] = { "<cmd>BufferGoto 8<cr>", "8" },
- ["9"] = { "<cmd>BufferGoto 9<cr>", "9" },
- },
- l = {
- name = "LSP",
- a = { "<cmd>lua vim.lsp.buf.code_action()<cr>", "Action" },
- f = { "<cmd>lua vim.lsp.buf.format({ async = false, timeout_ms = 5000 })<cr>", "Format" },
- d = { "<cmd>lua vim.diagnostic.open_float()<cr>", "Diagnostic" },
- h = { "<cmd>lua vim.lsp.buf.hover()<cr>", "Help" },
- g = {
- name = "Go to",
- D = { "<cmd>lua vim.lsp.buf.declaration()<cr>", "Go to declaration" },
- d = { "<cmd>lua vim.lsp.buf.definition()<cr>", "Go to definition" },
- i = { "<cmd>lua vim.lsp.buf.definition()<cr>", "Go to implementation" },
- },
- },
- },
-
- config = function(_, opts)
- local wk = require("which-key")
- wk.register(opts, { prefix = "<leader>" })
- end,
-}