aboutsummaryrefslogtreecommitdiff
path: root/nvim/lua/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'nvim/lua/plugins')
-rw-r--r--nvim/lua/plugins/auto-pairs.lua7
-rw-r--r--nvim/lua/plugins/colors.lua142
-rw-r--r--nvim/lua/plugins/comment.lua50
-rw-r--r--nvim/lua/plugins/diffview.lua13
-rw-r--r--nvim/lua/plugins/gitsigns.lua112
-rw-r--r--nvim/lua/plugins/init.lua11
-rw-r--r--nvim/lua/plugins/lsp.lua100
-rw-r--r--nvim/lua/plugins/markdown-preview.lua11
-rw-r--r--nvim/lua/plugins/telescope.lua52
-rw-r--r--nvim/lua/plugins/todo-comments.lua54
-rw-r--r--nvim/lua/plugins/treesitter.lua30
-rw-r--r--nvim/lua/plugins/undotree.lua9
12 files changed, 591 insertions, 0 deletions
diff --git a/nvim/lua/plugins/auto-pairs.lua b/nvim/lua/plugins/auto-pairs.lua
new file mode 100644
index 0000000..7fdb560
--- /dev/null
+++ b/nvim/lua/plugins/auto-pairs.lua
@@ -0,0 +1,7 @@
+return {
+ {
+ 'windwp/nvim-autopairs',
+ event = "InsertEnter",
+ config = true
+ },
+}
diff --git a/nvim/lua/plugins/colors.lua b/nvim/lua/plugins/colors.lua
new file mode 100644
index 0000000..25d016d
--- /dev/null
+++ b/nvim/lua/plugins/colors.lua
@@ -0,0 +1,142 @@
+return {
+ --[[-- PaperColor --]]
+
+ {
+ "NLKNguyen/papercolor-theme",
+ lazy = false,
+ priority = 1000,
+ config = function()
+ vim.opt.background = "dark"
+ vim.cmd.colorscheme "PaperColor"
+
+ vim.api.nvim_set_hl(0, "Normal", { bg = "NONE", ctermbg = "NONE" })
+ vim.api.nvim_set_hl(0, "NormalNC", { bg = "NONE", ctermbg = "NONE" })
+ vim.api.nvim_set_hl(0, "NormalFloat", { bg = "NONE", ctermbg = "NONE" })
+ vim.api.nvim_set_hl(0, "SignColumn", { bg = "NONE", ctermbg = "NONE" })
+ vim.api.nvim_set_hl(0, "LineNr", { bg = "NONE", ctermbg = "NONE" })
+ vim.api.nvim_set_hl(0, "Folded", { bg = "NONE", ctermbg = "NONE" })
+ vim.api.nvim_set_hl(0, "NonText", { bg = "NONE", ctermbg = "NONE" })
+ vim.api.nvim_set_hl(0, "SpecialKey", { bg = "NONE", ctermbg = "NONE" })
+ vim.api.nvim_set_hl(0, "VertSplit", { bg = "NONE", ctermbg = "NONE" })
+ vim.api.nvim_set_hl(0, "Comment", { fg = "#ADD8E6", italic = true })
+ vim.api.nvim_set_hl(0, "TabChar", { fg = "#1A1A1A", ctermfg = "darkgray"})
+ vim.api.nvim_set_hl(0, "String", { fg = "#b58c4a" })
+ vim.api.nvim_set_hl(0, "cType", { fg = "NONE" })
+
+ --vim.api.nvim_set_hl(0, "Type", { fg = "NONE" , bold=false})
+ vim.api.nvim_set_hl(0, "Type", { fg = "#FFFF00" , bold=false})
+ vim.api.nvim_set_hl(0, "cType", { fg = "#FFFF00" , bold=false})
+ vim.api.nvim_set_hl(0, "Constant", { fg = "#d7875f"})
+ vim.api.nvim_set_hl(0, "Identifier", { fg = "NONE" })
+ end,
+ },
+
+ --[[-- PaperColor Slim --]]
+
+ -- {
+ -- "pappasam/papercolor-theme-slim",
+ -- lazy = false,
+ -- priority = 1000,
+ -- config = function()
+ -- vim.opt.background = "dark"
+ --vim.cmd.colorscheme "PaperColorSlim"
+
+ -- vim.api.nvim_set_hl(0, "Normal", { bg = "NONE", ctermbg = "NONE" })
+ -- vim.api.nvim_set_hl(0, "NormalNC", { bg = "NONE", ctermbg = "NONE" })
+ -- vim.api.nvim_set_hl(0, "NormalFloat", { bg = "NONE", ctermbg = "NONE" })
+ -- vim.api.nvim_set_hl(0, "SignColumn", { bg = "NONE", ctermbg = "NONE" })
+ -- vim.api.nvim_set_hl(0, "LineNr", { bg = "NONE", ctermbg = "NONE" })
+ -- vim.api.nvim_set_hl(0, "Folded", { bg = "NONE", ctermbg = "NONE" })
+ -- vim.api.nvim_set_hl(0, "NonText", { bg = "NONE", ctermbg = "NONE" })
+ -- vim.api.nvim_set_hl(0, "SpecialKey", { bg = "NONE", ctermbg = "NONE" })
+ -- vim.api.nvim_set_hl(0, "VertSplit", { bg = "NONE", ctermbg = "NONE" })
+ -- vim.api.nvim_set_hl(0, "Comment", { fg = "#ADD8E6", italic = true })
+ -- vim.api.nvim_set_hl(0, "TabChar", { fg = "#1A1A1A", ctermfg = "darkgray"})
+ -- vim.api.nvim_set_hl(0, "String", { fg = "#b58c4a" })
+
+ -- end,
+ -- },
+
+
+ --[[
+ {
+ "catppuccin/nvim",
+ config = function()
+ require("catppuccin").setup({
+ flavour = "auto", -- latte, frappe, macchiato, mocha
+ background = { -- :h background
+ light = "latte",
+ dark = "mocha",
+ },
+ transparent_background = false, -- disables setting the background color.
+ show_end_of_buffer = false, -- shows the '~' characters after the end of buffers
+ term_colors = false, -- sets terminal colors (e.g. `g:terminal_color_0`)
+ dim_inactive = {
+ enabled = false, -- dims the background color of inactive window
+ shade = "dark",
+ percentage = 0.15, -- percentage of the shade to apply to the inactive window
+ },
+ no_italic = false, -- Force no italic
+ no_bold = false, -- Force no bold
+ no_underline = false, -- Force no underline
+ styles = { -- Handles the styles of general hi groups (see `:h highlight-args`):
+ comments = { "italic" }, -- Change the style of comments
+ conditionals = { "italic" },
+ loops = {},
+ functions = {},
+ keywords = {},
+ strings = {},
+ variables = {},
+ numbers = {},
+ booleans = {},
+ properties = {},
+ types = {},
+ operators = {},
+ -- miscs = {}, -- Uncomment to turn off hard-coded styles
+ },
+ color_overrides = {},
+ custom_highlights = {},
+ default_integrations = true,
+ integrations = {
+ cmp = true,
+ gitsigns = true,
+ nvimtree = true,
+ treesitter = true,
+ notify = false,
+ mini = {
+ enabled = true,
+ indentscope_color = "",
+ },
+ -- For more plugins integrations please scroll down (https://github.com/catppuccin/nvim#integrations)
+ },
+ })
+
+ -- setup must be called before loading
+ --vim.cmd.colorscheme "catppuccin" -- catppuccin-latte, catppuccin-frappe, catppuccin-macchiato, catppuccin-mocha
+ vim.cmd.colorscheme "catppuccin-macchiato"
+
+
+ vim.api.nvim_set_hl(0, "Normal", { bg = "NONE", ctermbg = "NONE" })
+ end,
+ },
+ --]]
+
+
+ --[[-- Additional Syntax Support --]]
+ {
+ "NLKNguyen/c-syntax.vim"
+ },
+
+ {
+ --"junegunn/rainbow_parentheses.vim",
+ --"luochen1990/rainbow",
+ --"kien/rainbow_parentheses.vim",
+
+ --[[ -- does work
+ "luochen1990/rainbow",
+ event = { 'BufReadPre', 'BufNewFile' },
+ init = function() vim.g.rainbow_active = 1 end,
+ config = function() vim.cmd('RainbowToggleOn') end,
+ --]]
+ },
+}
diff --git a/nvim/lua/plugins/comment.lua b/nvim/lua/plugins/comment.lua
new file mode 100644
index 0000000..e485b9b
--- /dev/null
+++ b/nvim/lua/plugins/comment.lua
@@ -0,0 +1,50 @@
+return {
+ {
+ "numToStr/Comment.nvim",
+ config = function()
+ require('Comment').setup({
+ ---Add a space b/w comment and the line
+ padding = true,
+ ---Whether the cursor should stay at its position
+ sticky = true,
+ ---Lines to be ignored while (un)comment
+ ignore = nil,
+ ---LHS of toggle mappings in NORMAL mode
+ toggler = {
+ ---Line-comment toggle keymap
+ line = 'gcc',
+ ---Block-comment toggle keymap
+ block = 'gbc',
+ },
+ ---LHS of operator-pending mappings in NORMAL and VISUAL mode
+ opleader = {
+ ---Line-comment keymap
+ line = 'gc',
+ ---Block-comment keymap
+ block = 'gb',
+ },
+ ---LHS of extra mappings
+ extra = {
+ ---Add comment on the line above
+ above = 'gcO',
+ ---Add comment on the line below
+ below = 'gco',
+ ---Add comment at the end of line
+ eol = 'gcA',
+ },
+ ---Enable keybindings
+ ---NOTE: If given `false` then the plugin won't create any mappings
+ mappings = {
+ ---Operator-pending mapping; `gcc` `gbc` `gc[count]{motion}` `gb[count]{motion}`
+ basic = true,
+ ---Extra mapping; `gco`, `gcO`, `gcA`
+ extra = true,
+ },
+ ---Function to call before (un)comment
+ pre_hook = nil,
+ ---Function to call after (un)comment
+ post_hook = nil,
+ })
+ end,
+ },
+}
diff --git a/nvim/lua/plugins/diffview.lua b/nvim/lua/plugins/diffview.lua
new file mode 100644
index 0000000..ec440b1
--- /dev/null
+++ b/nvim/lua/plugins/diffview.lua
@@ -0,0 +1,13 @@
+return {
+ {
+ "sindrets/diffview.nvim",
+ config = function()
+ -- TODO: keymaps
+ -- :DiffviewOpen
+ -- :DiffviewClose
+ -- :DiffviewToggleFiles
+ -- :DiffviewFileHistory
+ -- :DiffviewFileHistory %
+ end,
+ },
+}
diff --git a/nvim/lua/plugins/gitsigns.lua b/nvim/lua/plugins/gitsigns.lua
new file mode 100644
index 0000000..6ee0348
--- /dev/null
+++ b/nvim/lua/plugins/gitsigns.lua
@@ -0,0 +1,112 @@
+return {
+ {
+ "lewis6991/gitsigns.nvim",
+ config = function()
+
+ require('gitsigns').setup {
+ signs = {
+ add = { text = '+' },
+ --change = { text = '┃' },
+ change = { text = 'Δ' },
+ delete = { text = '-' },
+ topdelete = { text = '-' },
+ changedelete = { text = 'Δ-' },
+ untracked = { text = '~' },
+ },
+ signs_staged = {
+ add = { text = '+' },
+ --change = { text = '┃' },
+ change = { text = 'Δ' },
+ delete = { text = '-' },
+ topdelete = { text = '-' },
+ changedelete = { text = 'Δ-' },
+ untracked = { text = '~' },
+ },
+ signs_staged_enable = true,
+ signcolumn = true, -- Toggle with `:Gitsigns toggle_signs`
+ numhl = false, -- Toggle with `:Gitsigns toggle_numhl`
+ linehl = false, -- Toggle with `:Gitsigns toggle_linehl`
+ word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff`
+ watch_gitdir = {
+ follow_files = true
+ },
+ auto_attach = true,
+ attach_to_untracked = false,
+ current_line_blame = false, -- Toggle with `:Gitsigns toggle_current_line_blame`
+ current_line_blame_opts = {
+ virt_text = true,
+ virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align'
+ delay = 1000,
+ ignore_whitespace = false,
+ virt_text_priority = 100,
+ use_focus = true,
+ },
+ current_line_blame_formatter = '<author>, <author_time:%R> - <summary>',
+ sign_priority = 6,
+ update_debounce = 100,
+ status_formatter = nil, -- Use default
+ max_file_length = 40000, -- Disable if file is longer than this (in lines)
+ preview_config = {
+ -- Options passed to nvim_open_win
+ border = 'single',
+ style = 'minimal',
+ relative = 'cursor',
+ row = 0,
+ col = 1
+ },
+
+ --[[-- Key Maps --]]
+
+ on_attach = function(bufnr)
+ local gitsigns = require('gitsigns')
+
+ local function map(mode, l, r, opts)
+ opts = opts or {}
+ opts.buffer = bufnr
+ vim.keymap.set(mode, l, r, opts)
+ end
+
+ -- Navigation
+ map('n', ']c', function()
+ if vim.wo.diff then
+ vim.cmd.normal({']c', bang = true})
+ else
+ gitsigns.nav_hunk('next')
+ end
+ end)
+
+ map('n', '[c', function()
+ if vim.wo.diff then
+ vim.cmd.normal({'[c', bang = true})
+ else
+ gitsigns.nav_hunk('prev')
+ end
+ end)
+ vim.api.nvim_set_hl(0, "GitSignsChangeDelete", { fg = "#E1341E", bg = "NONE" })
+ vim.api.nvim_set_hl(0, "GitSignsTopDelete", { fg = "#E1341E", bg = "NONE" })
+ vim.api.nvim_set_hl(0, "GitSignsDelete", { fg = "#E1341E", bg = "NONE" })
+
+
+ -- Actions
+ --[[
+ map('n', '<leader>hs', gitsigns.stage_hunk)
+ map('n', '<leader>hr', gitsigns.reset_hunk)
+ map('v', '<leader>hs', function() gitsigns.stage_hunk {vim.fn.line('.'), vim.fn.line('v')} end)
+ map('v', '<leader>hr', function() gitsigns.reset_hunk {vim.fn.line('.'), vim.fn.line('v')} end)
+ map('n', '<leader>hS', gitsigns.stage_buffer)
+ map('n', '<leader>hu', gitsigns.undo_stage_hunk)
+ map('n', '<leader>hR', gitsigns.reset_buffer)
+ map('n', '<leader>hp', gitsigns.preview_hunk)
+ map('n', '<leader>hb', function() gitsigns.blame_line{full=true} end)
+ map('n', '<leader>tb', gitsigns.toggle_current_line_blame)
+ map('n', '<leader>hd', gitsigns.diffthis)
+ map('n', '<leader>hD', function() gitsigns.diffthis('~') end)
+ map('n', '<leader>td', gitsigns.toggle_deleted)
+ -- Text object
+ map({'o', 'x'}, 'ih', ':<C-U>Gitsigns select_hunk<CR>')
+ --]]
+ end,
+ }
+ end,
+ }
+}
diff --git a/nvim/lua/plugins/init.lua b/nvim/lua/plugins/init.lua
new file mode 100644
index 0000000..ffd4623
--- /dev/null
+++ b/nvim/lua/plugins/init.lua
@@ -0,0 +1,11 @@
+return {
+ require("plugins.telescope"),
+ require("plugins.treesitter"),
+ require("plugins.lsp"),
+ require("plugins.colors"),
+ require("plugins.todo-comments"),
+ require("plugins.auto-pairs"),
+ require("plugins.gitsigns"),
+ require("plugins.comment"),
+ require("plugins.markdown-preview"),
+}
diff --git a/nvim/lua/plugins/lsp.lua b/nvim/lua/plugins/lsp.lua
new file mode 100644
index 0000000..e33925e
--- /dev/null
+++ b/nvim/lua/plugins/lsp.lua
@@ -0,0 +1,100 @@
+return
+{
+ 'VonHeikemen/lsp-zero.nvim',
+ branch = 'v3.x',
+ dependencies = {
+ -- LSP Support
+ {'neovim/nvim-lspconfig'},
+ {'williamboman/mason.nvim'},
+ {'williamboman/mason-lspconfig.nvim'},
+ {'folke/todo-comments.nvim'}, -- doesn't load for some reason
+
+ -- Autocompletion
+ {'hrsh7th/nvim-cmp'},
+ {'hrsh7th/cmp-nvim-lsp'},
+ {'hrsh7th/cmp-buffer'},
+ {'hrsh7th/cmp-path'},
+ {'saadparwaiz1/cmp_luasnip'},
+ {'hrsh7th/cmp-nvim-lua'},
+
+ -- Snippets
+ {'L3MON4D3/LuaSnip'},
+ {'rafamadriz/friendly-snippets'},
+ },
+
+ config = function()
+ local lsp_zero = require('lsp-zero')
+
+ lsp_zero.on_attach(function(client, bufnr)
+ -- see :help lsp-zero-keybindings
+ -- to learn the available actions
+ lsp_zero.default_keymaps({buffer = bufnr})
+
+ vim.keymap.set('n', 'K', '<cmd>lua vim.lsp.buf.hover()<cr>', opts)
+ vim.keymap.set('n', 'gd', '<cmd>lua vim.lsp.buf.definition()<cr>', opts)
+ vim.keymap.set('n', 'gD', '<cmd>lua vim.lsp.buf.declaration()<cr>', opts)
+ vim.keymap.set('n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<cr>', opts)
+ vim.keymap.set('n', 'go', '<cmd>lua vim.lsp.buf.type_definition()<cr>', opts)
+ vim.keymap.set('n', 'gr', '<cmd>lua vim.lsp.buf.references()<cr>', opts)
+ vim.keymap.set('n', 'gs', '<cmd>lua vim.lsp.buf.signature_help()<cr>', opts)
+ end)
+
+ -- to learn how to use mason.nvim with lsp-zero
+ -- read this: https://github.com/VonHeikemen/lsp-zero.nvim/blob/v3.x/doc/md/guides/integrate-with-mason-nvim.md
+ require('mason').setup({})
+ require('mason-lspconfig').setup({
+ ensure_installed = {
+ 'lua_ls',
+ 'clangd',
+ 'texlab',
+ },
+ handlers = {
+ lsp_zero.default_setup,
+ },
+ })
+
+ -- Setup completion
+ local cmp = require('cmp')
+ local cmp_action = lsp_zero.cmp_action()
+
+ cmp.setup({
+ mapping = cmp.mapping.preset.insert({
+ ['<CR>'] = cmp.mapping.confirm({select = false}),
+ ['<C-Space>'] = cmp.mapping.complete(),
+ ['<C-f>'] = cmp_action.luasnip_jump_forward(),
+ ['<C-b>'] = cmp_action.luasnip_jump_backward(),
+ ['<C-u>'] = cmp.mapping.scroll_docs(-4),
+ ['<C-d>'] = cmp.mapping.scroll_docs(4),
+ }),
+ snippet = {
+ expand = function(args)
+ -- You need Neovim v0.10 to use vim.snippet
+ vim.snippet.expand(args.body)
+ end,
+ },
+ })
+
+ require('lspconfig').lua_ls.setup({
+ capabilities = lsp_capabilities,
+ settings = {
+ Lua = {
+ runtime = {
+ version = 'LuaJIT'
+ },
+ diagnostics = {
+ globals = {'vim'},
+ disable = { 'unused-function' },
+ },
+ workspace = {
+ library = {
+ vim.env.VIMRUNTIME,
+ }
+ }
+ }
+ }
+ })
+
+
+ end
+
+}
diff --git a/nvim/lua/plugins/markdown-preview.lua b/nvim/lua/plugins/markdown-preview.lua
new file mode 100644
index 0000000..b325fdd
--- /dev/null
+++ b/nvim/lua/plugins/markdown-preview.lua
@@ -0,0 +1,11 @@
+return {
+ {
+ "iamcco/markdown-preview.nvim",
+ cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" },
+ build = "cd app && yarn install",
+ init = function()
+ vim.g.mkdp_filetypes = { "markdown" }
+ end,
+ ft = { "markdown" },
+ },
+}
diff --git a/nvim/lua/plugins/telescope.lua b/nvim/lua/plugins/telescope.lua
new file mode 100644
index 0000000..bd26f0f
--- /dev/null
+++ b/nvim/lua/plugins/telescope.lua
@@ -0,0 +1,52 @@
+return {
+ {
+ 'nvim-telescope/telescope.nvim', tag = '0.1.8',
+ dependencies = { 'nvim-lua/plenary.nvim' },
+
+ config = function()
+ local builtin = require('telescope.builtin')
+ vim.keymap.set('n', '<leader>ff', builtin.find_files, { desc = 'Telescope find files' })
+ vim.keymap.set('n', '<C-p>', builtin.git_files, { desc = 'hello world' })
+ vim.keymap.set('n', '<leader>ps', function()
+ builtin.grep_string({ search = vim.fn.input("Grep > ") });
+ end)
+
+ vim.keymap.set("n", "<leader>rw", function()
+ builtin.grep_string { search = vim.fn.expand "<cword>", }
+ end, { silent = true})
+ end
+ },
+
+ {
+ "debugloop/telescope-undo.nvim",
+ dependencies = { -- note how they're inverted to above example
+ {
+ "nvim-telescope/telescope.nvim",
+ dependencies = { "nvim-lua/plenary.nvim" },
+ },
+ },
+ keys = {
+ { -- lazy style key map
+ "<leader>u",
+ "<cmd>Telescope undo<cr>",
+ desc = "undo history",
+ },
+ },
+ opts = {
+ -- don't use `defaults = { }` here, do this in the main telescope spec
+ extensions = {
+ undo = {
+ -- telescope-undo.nvim config, see below
+ },
+ -- no other extensions here, they can have their own spec too
+ },
+ },
+ config = function(_, opts)
+ -- Calling telescope's setup from multiple specs does not hurt, it will happily merge the
+ -- configs for us. We won't use data, as everything is in it's own namespace (telescope
+ -- defaults, as well as each extension).
+ require("telescope").setup(opts)
+ require("telescope").load_extension("undo")
+ end,
+ },
+}
diff --git a/nvim/lua/plugins/todo-comments.lua b/nvim/lua/plugins/todo-comments.lua
new file mode 100644
index 0000000..b62212c
--- /dev/null
+++ b/nvim/lua/plugins/todo-comments.lua
@@ -0,0 +1,54 @@
+-- lua/plugins/todo-comments.lua
+return {
+ "folke/todo-comments.nvim",
+ dependencies = { "nvim-lua/plenary.nvim" },
+ event = { "BufReadPost", "BufNewFile" },
+ config = function()
+ require("todo-comments").setup({
+ signs = true,
+ sign_priority = 8,
+
+ keywords = {
+ FIX = {
+ icon = " ",
+ color = "error",
+ alt = { "FIXME", "BUG", "FIXIT", "ISSUE" }, -- keywords that map to FIX
+ },
+ TODO = { icon = " ", color = "info" },
+ HACK = { icon = " ", color = "warning" },
+ WARN = { icon = " ", color = "warning", alt = { "WARNING", "XXX" } },
+ PERF = { icon = " ", alt = { "OPTIM", "PERFORMANCE", "OPTIMIZE" } },
+ NOTE = { icon = " ", color = "hint", alt = { "INFO" } },
+ TEST = { icon = "⏲ ", color = "test", alt = { "TESTING", "PASSED", "FAILED" } },
+ DEBUG = { icon = "🐛", color = "info"},
+ FIX = { icon = "🔧", color = "#FF00FF"},
+
+ },
+ colors = {
+ error = { "DiagnosticError", "ErrorMsg", "#DC2626" },
+ warning = { "DiagnosticWarn", "WarningMsg", "#FBBF24" },
+ info = { "DiagnosticInfo", "#2563EB" },
+ hint = { "DiagnosticHint", "#10B981" },
+ default = { "Identifier", "#7C3AED" },
+ test = { "Identifier", "#FF00FF" }
+ },
+ highlight = {
+ multiline = true, -- enable multine todo comments
+ }
+
+ })
+
+ -- Add some keymaps for todo-comments
+ vim.keymap.set("n", "]t", function()
+ require("todo-comments").jump_next()
+ end, { desc = "Next todo comment" })
+
+ vim.keymap.set("n", "[t", function()
+ require("todo-comments").jump_prev()
+ end, { desc = "Previous todo comment" })
+
+ -- Search todo comments
+ vim.keymap.set("n", "<leader>cf", ":TodoTelescope<CR>",
+ { desc = "Find todo comments", silent = true })
+ end,
+}
diff --git a/nvim/lua/plugins/treesitter.lua b/nvim/lua/plugins/treesitter.lua
new file mode 100644
index 0000000..f3f4dd0
--- /dev/null
+++ b/nvim/lua/plugins/treesitter.lua
@@ -0,0 +1,30 @@
+return {
+ {
+ "nvim-treesitter/nvim-treesitter",
+ build = ":TSUpdate",
+ event = { "BufReadPost", "BufNewFile" },
+
+ config = function()
+ require("nvim-treesitter.configs").setup({
+ ensure_installed = {
+ --"c",
+ "bash",
+ "markdown",
+ "markdown_inline",
+ "bibtex",
+ "latex",
+ "vimdoc",
+ },
+ --ignore_installed = { "c" },
+ sync_install = false,
+ auto_install = true,
+
+ highlight = {
+ enable = true,
+ additional_vim_regex_highlighting = false,
+ disable = { "c", "cpp", "h" }
+ }
+ })
+ end,
+ },
+}
diff --git a/nvim/lua/plugins/undotree.lua b/nvim/lua/plugins/undotree.lua
new file mode 100644
index 0000000..e874811
--- /dev/null
+++ b/nvim/lua/plugins/undotree.lua
@@ -0,0 +1,9 @@
+return {
+ {
+ "mbbill/undotree",
+
+ config = function()
+ vim.keymap.set('n', '<leader>u', vim.cmd.UndotreeToggle)
+ end
+ },
+}