From 8061281109e74a23baf1854cbff82a8fd4bbc2ed Mon Sep 17 00:00:00 2001 From: Abhigyan Madhukalya <102839682+abhigyanmadhukalya@users.noreply.github.com> Date: Sat, 8 Oct 2022 18:43:06 +0530 Subject: [PATCH] made neovim config using XDG_BASE_FOLDER specifications --- .config/nvim/after/plugin/dashboard.rc.lua | 68 +++++ .config/nvim/after/plugin/orgmode.rc.lua | 17 ++ .config/nvim/after/plugin/telescope.rc.lua | 30 ++ .config/nvim/after/plugin/treesitter.rc.lua | 20 ++ .config/nvim/after/plugin/which-key.rc.lua | 15 + .config/nvim/init.lua | 313 +------------------- .config/nvim/lua/dt/base.lua | 91 ++++++ .config/nvim/lua/dt/bootstrap.lua | 14 + .config/nvim/lua/dt/highlights.lua | 28 ++ .config/nvim/lua/dt/maps.lua | 27 ++ .config/nvim/lua/dt/plugins.lua | 76 +++++ 11 files changed, 391 insertions(+), 308 deletions(-) create mode 100644 .config/nvim/after/plugin/dashboard.rc.lua create mode 100644 .config/nvim/after/plugin/orgmode.rc.lua create mode 100644 .config/nvim/after/plugin/telescope.rc.lua create mode 100644 .config/nvim/after/plugin/treesitter.rc.lua create mode 100644 .config/nvim/after/plugin/which-key.rc.lua create mode 100644 .config/nvim/lua/dt/base.lua create mode 100644 .config/nvim/lua/dt/bootstrap.lua create mode 100644 .config/nvim/lua/dt/highlights.lua create mode 100644 .config/nvim/lua/dt/maps.lua create mode 100644 .config/nvim/lua/dt/plugins.lua diff --git a/.config/nvim/after/plugin/dashboard.rc.lua b/.config/nvim/after/plugin/dashboard.rc.lua new file mode 100644 index 0000000..19c0812 --- /dev/null +++ b/.config/nvim/after/plugin/dashboard.rc.lua @@ -0,0 +1,68 @@ +------------------------------------------------- +-- DT'S NEOVIM CONFIGURATION +-- Neovim website: https://neovim.io/ +-- DT's dotfiles: https://gitlab.com/dwt1/dotfiles +------------------------------------------------- + +local status, db = pcall(require, "dashboard") +local home = os.getenv("HOME") + +db.default_banner = { + "", + "", + " ███╗ ██╗ ███████╗ ██████╗ ██╗ ██╗ ██╗ ███╗ ███╗", + " ████╗ ██║ ██╔════╝██╔═══██╗ ██║ ██║ ██║ ████╗ ████║", + " ██╔██╗ ██║ █████╗ ██║ ██║ ██║ ██║ ██║ ██╔████╔██║", + " ██║╚██╗██║ ██╔══╝ ██║ ██║ ╚██╗ ██╔╝ ██║ ██║╚██╔╝██║", + " ██║ ╚████║ ███████╗╚██████╔╝ ╚████╔╝ ██║ ██║ ╚═╝ ██║", + " ╚═╝ ╚═══╝ ╚══════╝ ╚═════╝ ╚═══╝ ╚═╝ ╚═╝ ╚═╝", + "", + " [ TIP: To exit Neovim, just power off your computer. ] ", + "", +} +-- linux +--db.preview_command = 'ueberzug' +-- +--db.preview_file_path = home .. '/.config/nvim/static/neovim.cat' +db.preview_file_height = 11 +db.preview_file_width = 70 +db.custom_center = { + { + icon = " ", + desc = "Recent sessions ", + shortcut = "SPC s l", + action = "SessionLoad", + }, + { + icon = " ", + desc = "Find recent files ", + action = "Telescope oldfiles", + shortcut = "SPC f r", + }, + { + icon = " ", + desc = "Find files ", + action = "Telescope find_files find_command=rg,--hidden,--files", + shortcut = "SPC f f", + }, + { + icon = " ", + desc = "File browser ", + action = "Telescope file_browser", + shortcut = "SPC f b", + }, + { + icon = " ", + desc = "Find word ", + action = "Telescope live_grep", + shortcut = "SPC f w", + }, + { + icon = " ", + desc = "Load new theme ", + action = "Telescope colorscheme", + shortcut = "SPC h t", + }, +} +db.custom_footer = { "", "🎉 If I'm using Neovim, then my Emacs config must be broken!" } +db.session_directory = "/home/dt/.config/nvim/session" diff --git a/.config/nvim/after/plugin/orgmode.rc.lua b/.config/nvim/after/plugin/orgmode.rc.lua new file mode 100644 index 0000000..c2540ad --- /dev/null +++ b/.config/nvim/after/plugin/orgmode.rc.lua @@ -0,0 +1,17 @@ +------------------------------------------------- +-- DT'S NEOVIM CONFIGURATION +-- Neovim website: https://neovim.io/ +-- DT's dotfiles: https://gitlab.com/dwt1/dotfiles +------------------------------------------------- + +local status, orgmode = pcall(require, "orgmode") +if not status then + return +end + +orgmode.setup({ + org_agenda_files = { "~/nc/Org/agenda.org" }, + org_default_notes_file = "~/nc/Org/notes.org", +}) + +orgmode.setup_ts_grammar() diff --git a/.config/nvim/after/plugin/telescope.rc.lua b/.config/nvim/after/plugin/telescope.rc.lua new file mode 100644 index 0000000..2826903 --- /dev/null +++ b/.config/nvim/after/plugin/telescope.rc.lua @@ -0,0 +1,30 @@ +------------------------------------------------- +-- DT'S NEOVIM CONFIGURATION +-- Neovim website: https://neovim.io/ +-- DT's dotfiles: https://gitlab.com/dwt1/dotfiles +------------------------------------------------- +-- +local status, telescope = pcall(require, "telescope") +if not status then + return +end + +telescope.setup({ + extensions = { + file_browser = { + theme = "ivy", + -- disables netrw and use telescope-file-browser in its place + hijack_netrw = true, + mappings = { + ["i"] = { + -- your custom insert mode mappings + }, + ["n"] = { + -- your custom normal mode mappings + }, + }, + }, + }, +}) + +telescope.load_extension("file_browser") diff --git a/.config/nvim/after/plugin/treesitter.rc.lua b/.config/nvim/after/plugin/treesitter.rc.lua new file mode 100644 index 0000000..fb18755 --- /dev/null +++ b/.config/nvim/after/plugin/treesitter.rc.lua @@ -0,0 +1,20 @@ +------------------------------------------------- +-- DT'S NEOVIM CONFIGURATION +-- Neovim website: https://neovim.io/ +-- DT's dotfiles: https://gitlab.com/dwt1/dotfiles +------------------------------------------------- + +local status, ts = pcall(require, "nvim-treesitter.configs") +if not status then + return +end + +ts.setup({ + -- If TS highlights are not enabled at all, or disabled via `disable` prop, + -- highlighting will fallback to default Vim syntax highlighting + highlight = { + enable = true, + additional_vim_regex_highlighting = { "org" }, -- Required for spellcheck, some LaTex highlights and code block highlights that do not have ts grammar + }, + ensure_installed = { "org", "lua" }, -- Or run :TSUpdate org +}) diff --git a/.config/nvim/after/plugin/which-key.rc.lua b/.config/nvim/after/plugin/which-key.rc.lua new file mode 100644 index 0000000..a94c1a1 --- /dev/null +++ b/.config/nvim/after/plugin/which-key.rc.lua @@ -0,0 +1,15 @@ +------------------------------------------------- +-- DT'S NEOVIM CONFIGURATION +-- Neovim website: https://neovim.io/ +-- DT's dotfiles: https://gitlab.com/dwt1/dotfiles +------------------------------------------------- + +local status, which_key = pcall(require, "which-key") +if not status then + return +end + +which_key.setup({ + -- your configuration comes here + -- or leave it empty to use the default settings +}) diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index 0836419..0b58007 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -1,308 +1,5 @@ -------------------------------------------------- --- DT'S NEOVIM CONFIGURATION --- Neovim website: https://neovim.io/ --- DT's dotfiles: https://gitlab.com/dwt1/dotfiles -------------------------------------------------- - -local g = vim.g -local o = vim.o -local opt = vim.opt -local A = vim.api - --- cmd('syntax on') --- vim.api.nvim_command('filetype plugin indent on') - -o.termguicolors = true --- o.background = 'dark' - --- Do not save when switching buffers --- o.hidden = true - --- Decrease update time -o.timeoutlen = 500 -o.updatetime = 200 - --- Number of screen lines to keep above and below the cursor -o.scrolloff = 8 - --- Better editor UI -o.number = true -o.numberwidth = 2 -o.relativenumber = true -o.signcolumn = 'yes' -o.cursorline = true - --- Better editing experience -o.expandtab = true -o.smarttab = true -o.cindent = true -o.autoindent = true -o.wrap = true -o.textwidth = 300 -o.tabstop = 4 -o.shiftwidth = 4 -o.softtabstop = -1 -- If negative, shiftwidth value is used -o.list = true -o.listchars = 'trail:·,nbsp:◇,tab:→ ,extends:▸,precedes:◂' --- o.listchars = 'eol:¬,space:·,lead: ,trail:·,nbsp:◇,tab:→-,extends:▸,precedes:◂,multispace:···⬝,leadmultispace:│ ,' --- o.formatoptions = 'qrn1' - --- Makes neovim and host OS clipboard play nicely with each other -o.clipboard = 'unnamedplus' - --- Case insensitive searching UNLESS /C or capital in search -o.ignorecase = true -o.smartcase = true - --- Undo and backup options -o.backup = false -o.writebackup = false -o.undofile = true -o.swapfile = false --- o.backupdir = '/tmp/' --- o.directory = '/tmp/' --- o.undodir = '/tmp/' - --- Remember 50 items in commandline history -o.history = 50 - --- Better buffer splitting -o.splitright = true -o.splitbelow = true - --- Preserve view while jumping --- BUG This option causes an error! --- o.jumpoptions = 'view' - --- BUG: this won't update the search count after pressing `n` or `N` --- When running macros and regexes on a large file, lazy redraw tells neovim/vim not to draw the screen --- o.lazyredraw = true - --- Better folds (don't fold by default) --- o.foldmethod = 'indent' --- o.foldlevelstart = 99 --- o.foldnestmax = 3 --- o.foldminlines = 1 --- -opt.mouse = "a" - --- Map to space -g.mapleader = ' ' -g.maplocalleader = ' ' - - -------------------------------------------------- --- COLORSCHEMES -------------------------------------------------- - --- Uncomment just ONE of the following colorschemes! --- local ok, _ = pcall(vim.cmd, 'colorscheme base16-dracula') --- local ok, _ = pcall(vim.cmd, 'colorscheme base16-gruvbox-dark-medium') --- local ok, _ = pcall(vim.cmd, 'colorscheme base16-monokai') --- local ok, _ = pcall(vim.cmd, 'colorscheme base16-nord') --- local ok, _ = pcall(vim.cmd, 'colorscheme base16-oceanicnext') -local ok, _ = pcall(vim.cmd, 'colorscheme base16-onedark') --- local ok, _ = pcall(vim.cmd, 'colorscheme palenight') --- local ok, _ = pcall(vim.cmd, 'colorscheme base16-solarized-dark') --- local ok, _ = pcall(vim.cmd, 'colorscheme base16-solarized-light') --- local ok, _ = pcall(vim.cmd, 'colorscheme base16-tomorrow-night') - --- Highlight the region on yank -A.nvim_create_autocmd('TextYankPost', { - group = num_au, - callback = function() - vim.highlight.on_yank({ higroup = 'Visual', timeout = 120 }) - end, -}) - -------------------------------------------------- --- KEYBINDINGS -------------------------------------------------- - -local function map(m, k, v) - vim.keymap.set(m, k, v, { silent = true }) -end - --- Mimic shell movements -map('i', '', 'A') -map('i', '', 'I') - --- Load recent sessions -map('n', 'sl', 'SessionLoad') - --- Keybindings for telescope -map('n', 'fr', 'Telescope oldfiles') -map('n', 'ff', 'Telescope find_files') -map('n', 'fb', 'Telescope file_browser') -map('n', 'fw', 'Telescope live_grep') -map('n', 'ht', 'Telescope colorscheme') - -------------------------------------------------- --- DASHBOARD -------------------------------------------------- - -local db = require('dashboard') -local home = os.getenv('HOME') - -db.default_banner = { - '', - '', - ' ███╗ ██╗ ███████╗ ██████╗ ██╗ ██╗ ██╗ ███╗ ███╗', - ' ████╗ ██║ ██╔════╝██╔═══██╗ ██║ ██║ ██║ ████╗ ████║', - ' ██╔██╗ ██║ █████╗ ██║ ██║ ██║ ██║ ██║ ██╔████╔██║', - ' ██║╚██╗██║ ██╔══╝ ██║ ██║ ╚██╗ ██╔╝ ██║ ██║╚██╔╝██║', - ' ██║ ╚████║ ███████╗╚██████╔╝ ╚████╔╝ ██║ ██║ ╚═╝ ██║', - ' ╚═╝ ╚═══╝ ╚══════╝ ╚═════╝ ╚═══╝ ╚═╝ ╚═╝ ╚═╝', - '', - ' [ TIP: To exit Neovim, just power off your computer. ] ', - '', -} --- linux ---db.preview_command = 'ueberzug' --- ---db.preview_file_path = home .. '/.config/nvim/static/neovim.cat' -db.preview_file_height = 11 -db.preview_file_width = 70 -db.custom_center = { - {icon = ' ', - desc = 'Recent sessions ', - shortcut = 'SPC s l', - action ='SessionLoad'}, - {icon = ' ', - desc = 'Find recent files ', - action = 'Telescope oldfiles', - shortcut = 'SPC f r'}, - {icon = ' ', - desc = 'Find files ', - action = 'Telescope find_files find_command=rg,--hidden,--files', - shortcut = 'SPC f f'}, - {icon = ' ', - desc ='File browser ', - action = 'Telescope file_browser', - shortcut = 'SPC f b'}, - {icon = ' ', - desc = 'Find word ', - action = 'Telescope live_grep', - shortcut = 'SPC f w'}, - {icon = ' ', - desc = 'Load new theme ', - action = 'Telescope colorscheme', - shortcut = 'SPC h t'}, - } -db.custom_footer = { '', '🎉 If I\'m using Neovim, then my Emacs config must be broken!' } -db.session_directory = "/home/dt/.config/nvim/session" - -------------------------------------------------- --- PLUGINS -------------------------------------------------- - -return require('packer').startup(function() - -- Packer can manage itself - use 'wbthomason/packer.nvim' - - -- Dashboard is a nice start screen for nvim - use 'glepnir/dashboard-nvim' - - -- Telescope and related plugins -- - use { - 'nvim-telescope/telescope.nvim', tag = '0.1.0', - requires = { {'nvim-lua/plenary.nvim'} } - } - use { "nvim-telescope/telescope-file-browser.nvim", - config = function() - require("telescope").setup { - extensions = { - file_browser = { - theme = "ivy", - -- disables netrw and use telescope-file-browser in its place - hijack_netrw = true, - mappings = { - ["i"] = { - -- your custom insert mode mappings - }, - ["n"] = { - -- your custom normal mode mappings - }, - }, - }, - }, - } - end - } - -- To get telescope-file-browser loaded and working with telescope, - -- you need to call load_extension, somewhere after setup function: - require("telescope").load_extension "file_browser" - - -- Treesitter -- - use {'nvim-treesitter/nvim-treesitter', - config = function() - require'nvim-treesitter.configs'.setup { - -- If TS highlights are not enabled at all, or disabled via `disable` prop, - -- highlighting will fallback to default Vim syntax highlighting - highlight = { - enable = true, - additional_vim_regex_highlighting = {'org'}, -- Required for spellcheck, some LaTex highlights and code block highlights that do not have ts grammar - }, - ensure_installed = {'org'}, -- Or run :TSUpdate org - } - end - } - - -- Productivity -- - use 'vimwiki/vimwiki' - use 'jreybert/vimagit' - use {'nvim-orgmode/orgmode', - config = function() - require('orgmode').setup{ - org_agenda_files = {'~/nc/Org/agenda.org'}, - org_default_notes_file = '~/nc/Org/notes.org', - } - end - } - require('orgmode').setup_ts_grammar() - - -- Which key - use { - "folke/which-key.nvim", - config = function() - require("which-key").setup { - -- your configuration comes here - -- or leave it empty to use the default settings - } - end - } - - -- A better status line -- - use { 'nvim-lualine/lualine.nvim', - requires = { 'kyazdani42/nvim-web-devicons', opt = true } - } - require('lualine').setup() - - -- File management -- - use 'vifm/vifm.vim' - use 'scrooloose/nerdtree' - use 'tiagofumo/vim-nerdtree-syntax-highlight' - use 'ryanoasis/vim-devicons' - - -- Tim Pope Plugins -- - use 'tpope/vim-surround' - - -- Syntax Highlighting and Colors -- - use 'PotatoesMaster/i3-vim-syntax' - use 'kovetskiy/sxhkd-vim' - use 'vim-python/python-syntax' - use 'ap/vim-css-color' - - -- Junegunn Choi Plugins -- - use 'junegunn/goyo.vim' - use 'junegunn/limelight.vim' - use 'junegunn/vim-emoji' - - -- Colorschemes -- - use 'RRethy/nvim-base16' - use 'kyazdani42/nvim-palenight.lua' - - -- Other stuff -- - use 'frazrepo/vim-rainbow' -end) - +require("dt.base") -- General Settings +require("dt.highlights") -- Colourscheme and other highlights +require("dt.maps") -- Keymaps +require("dt.plugins") -- Plugins +require("dt.bootstrap") -- Packer Auto-Installer diff --git a/.config/nvim/lua/dt/base.lua b/.config/nvim/lua/dt/base.lua new file mode 100644 index 0000000..cac00b2 --- /dev/null +++ b/.config/nvim/lua/dt/base.lua @@ -0,0 +1,91 @@ +------------------------------------------------- +-- DT'S NEOVIM CONFIGURATION +-- Neovim website: https://neovim.io/ +-- DT's dotfiles: https://gitlab.com/dwt1/dotfiles +------------------------------------------------- + +local g = vim.g +local o = vim.o +local opt = vim.opt +local A = vim.api + +-- cmd('syntax on') +-- vim.api.nvim_command('filetype plugin indent on') + +o.termguicolors = true +-- o.background = 'dark' + +-- Do not save when switching buffers +-- o.hidden = true + +-- Decrease update time +o.timeoutlen = 500 +o.updatetime = 200 + +-- Number of screen lines to keep above and below the cursor +o.scrolloff = 8 + +-- Better editor UI +o.number = true +o.numberwidth = 2 +o.relativenumber = true +o.signcolumn = "yes" +o.cursorline = true + +-- Better editing experience +o.expandtab = true +o.smarttab = true +o.cindent = true +o.autoindent = true +o.wrap = true +o.textwidth = 300 +o.tabstop = 4 +o.shiftwidth = 4 +o.softtabstop = -1 -- If negative, shiftwidth value is used +o.list = true +o.listchars = "trail:·,nbsp:◇,tab:→ ,extends:▸,precedes:◂" +-- o.listchars = 'eol:¬,space:·,lead: ,trail:·,nbsp:◇,tab:→-,extends:▸,precedes:◂,multispace:···⬝,leadmultispace:│ ,' +-- o.formatoptions = 'qrn1' + +-- Makes neovim and host OS clipboard play nicely with each other +o.clipboard = "unnamedplus" + +-- Case insensitive searching UNLESS /C or capital in search +o.ignorecase = true +o.smartcase = true + +-- Undo and backup options +o.backup = false +o.writebackup = false +o.undofile = true +o.swapfile = false +-- o.backupdir = '/tmp/' +-- o.directory = '/tmp/' +-- o.undodir = '/tmp/' + +-- Remember 50 items in commandline history +o.history = 50 + +-- Better buffer splitting +o.splitright = true +o.splitbelow = true + +-- Preserve view while jumping +-- BUG This option causes an error! +-- o.jumpoptions = 'view' + +-- BUG: this won't update the search count after pressing `n` or `N` +-- When running macros and regexes on a large file, lazy redraw tells neovim/vim not to draw the screen +-- o.lazyredraw = true + +-- Better folds (don't fold by default) +-- o.foldmethod = 'indent' +-- o.foldlevelstart = 99 +-- o.foldnestmax = 3 +-- o.foldminlines = 1 +-- +opt.mouse = "a" + +-- Map to space +g.mapleader = " " +g.maplocalleader = " " diff --git a/.config/nvim/lua/dt/bootstrap.lua b/.config/nvim/lua/dt/bootstrap.lua new file mode 100644 index 0000000..66ec84a --- /dev/null +++ b/.config/nvim/lua/dt/bootstrap.lua @@ -0,0 +1,14 @@ +------------------------------------------------- +-- DT'S NEOVIM CONFIGURATION +-- Neovim website: https://neovim.io/ +-- DT's dotfiles: https://gitlab.com/dwt1/dotfiles +------------------------------------------------- + +local fn = vim.fn +local install_path = fn.stdpath("data") .. "/site/pack/packer/start/packer.nvim" + +if fn.empty(fn.glob(install_path)) > 0 then + packer_bootstrap = + fn.system({ "git", "clone", "--depth", "1", "https://github.com/wbthomason/packer.nvim", install_path }) + vim.cmd([[packadd packer.nvim]]) +end diff --git a/.config/nvim/lua/dt/highlights.lua b/.config/nvim/lua/dt/highlights.lua new file mode 100644 index 0000000..c9b95d2 --- /dev/null +++ b/.config/nvim/lua/dt/highlights.lua @@ -0,0 +1,28 @@ +------------------------------------------------- +-- DT'S NEOVIM CONFIGURATION +-- Neovim website: https://neovim.io/ +-- DT's dotfiles: https://gitlab.com/dwt1/dotfiles +------------------------------------------------- +------------------------------------------------- +-- COLORSCHEMES +------------------------------------------------- + +-- Uncomment just ONE of the following colorschemes! +-- local ok, _ = pcall(vim.cmd, 'colorscheme base16-dracula') +-- local ok, _ = pcall(vim.cmd, 'colorscheme base16-gruvbox-dark-medium') +-- local ok, _ = pcall(vim.cmd, 'colorscheme base16-monokai') +-- local ok, _ = pcall(vim.cmd, 'colorscheme base16-nord') +-- local ok, _ = pcall(vim.cmd, 'colorscheme base16-oceanicnext') +local ok, _ = pcall(vim.cmd, "colorscheme base16-onedark") +-- local ok, _ = pcall(vim.cmd, 'colorscheme palenight') +-- local ok, _ = pcall(vim.cmd, 'colorscheme base16-solarized-dark') +-- local ok, _ = pcall(vim.cmd, 'colorscheme base16-solarized-light') +-- local ok, _ = pcall(vim.cmd, 'colorscheme base16-tomorrow-night') + +-- Highlight the region on yank +A.nvim_create_autocmd("TextYankPost", { + group = num_au, + callback = function() + vim.highlight.on_yank({ higroup = "Visual", timeout = 120 }) + end, +}) diff --git a/.config/nvim/lua/dt/maps.lua b/.config/nvim/lua/dt/maps.lua new file mode 100644 index 0000000..13004c8 --- /dev/null +++ b/.config/nvim/lua/dt/maps.lua @@ -0,0 +1,27 @@ +------------------------------------------------- +-- DT'S NEOVIM CONFIGURATION +-- Neovim website: https://neovim.io/ +-- DT's dotfiles: https://gitlab.com/dwt1/dotfiles +------------------------------------------------- + +------------------------------------------------- +-- KEYBINDINGS +------------------------------------------------- + +local function map(m, k, v) + vim.keymap.set(m, k, v, { silent = true }) +end + +-- Mimic shell movements +map("i", "", "A") +map("i", "", "I") + +-- Load recent sessions +map("n", "sl", "SessionLoad") + +-- Keybindings for telescope +map("n", "fr", "Telescope oldfiles") +map("n", "ff", "Telescope find_files") +map("n", "fb", "Telescope file_browser") +map("n", "fw", "Telescope live_grep") +map("n", "ht", "Telescope colorscheme") diff --git a/.config/nvim/lua/dt/plugins.lua b/.config/nvim/lua/dt/plugins.lua new file mode 100644 index 0000000..712571e --- /dev/null +++ b/.config/nvim/lua/dt/plugins.lua @@ -0,0 +1,76 @@ +------------------------------------------------- +-- DT'S NEOVIM CONFIGURATION +-- Neovim website: https://neovim.io/ +-- DT's dotfiles: https://gitlab.com/dwt1/dotfiles +------------------------------------------------- + +local status, packer = pcall(require, "packer") +if not status then + print("Packer is not installed") + return +end + +-- Reloads Neovim after whenever you save plugins.lua +vim.cmd([[ + augroup packer_user_config + autocmd! + autocmd BufWritePost plugins.lua source | PackerSync + augroup END +]]) + +packer.startup(function(use) + -- Packer can manage itself + use("wbthomason/packer.nvim") + + -- Dashboard is a nice start screen for nvim + use("glepnir/dashboard-nvim") + + -- Telescope + use({ + "nvim-telescope/telescope.nvim", + tag = "0.1.0", + requires = { { "nvim-lua/plenary.nvim" } }, + }) + use("nvim-telescope/telescope-file-browser.nvim") + + use("nvim-treesitter/nvim-treesitter") -- Treesitter Syntax Highlighting + + -- Productivity + use("vimwiki/vimwiki") + use("jreybert/vimagit") + use("nvim-orgmode/orgmode") + + use("folke/which-key.nvim") -- Which Key + use("nvim-lualine/lualine.nvim") -- A better statusline + + -- File management -- + use("vifm/vifm.vim") + use("scrooloose/nerdtree") + use("tiagofumo/vim-nerdtree-syntax-highlight") + use("ryanoasis/vim-devicons") + + -- Tim Pope Plugins -- + use("tpope/vim-surround") + + -- Syntax Highlighting and Colors -- + use("PotatoesMaster/i3-vim-syntax") + use("kovetskiy/sxhkd-vim") + use("vim-python/python-syntax") + use("ap/vim-css-color") + + -- Junegunn Choi Plugins -- + use("junegunn/goyo.vim") + use("junegunn/limelight.vim") + use("junegunn/vim-emoji") + + -- Colorschemes -- + use("RRethy/nvim-base16") + use("kyazdani42/nvim-palenight.lua") + + -- Other stuff -- + use("frazrepo/vim-rainbow") + + if packer_bootstrap then + packer.sync() + end +end)