More neovim

master
Dustin Swan 2 years ago
parent d705c9b81d
commit dc9484cf0e
Signed by: dustinswan
GPG Key ID: AB49BD6B2B3A6377

@ -14,24 +14,22 @@ vim.opt.termguicolors = true
vim.opt.completeopt = "menu,menuone,noselect" vim.opt.completeopt = "menu,menuone,noselect"
require('packer').startup(function(use) require('packer').startup(function(use)
use { use 'wbthomason/packer.nvim'
'wbthomason/packer.nvim', use 'tpope/vim-surround'
config = function() use 'tpope/vim-repeat'
vim.keymap.set('n', '<leader>ps', ":PackerSync<cr>", { silent = true }) use 'felipec/vim-sanegx'
end use { 'sindrets/diffview.nvim', requires = 'nvim-lua/plenary.nvim' }
} use 'folke/neodev.nvim'
use 'jamessan/vim-gnupg'
use 'dhruvasagar/vim-table-mode'
use 'mfussenegger/nvim-dap'
use 'lukas-reineke/indent-blankline.nvim'
use 'LnL7/vim-nix'
use { use {
'nvim-telescope/telescope.nvim', 'nvim-telescope/telescope.nvim',
branch = '0.1.x', branch = '0.1.x',
requires = { 'nvim-lua/plenary.nvim' }, requires = { 'nvim-lua/plenary.nvim' }
config = function()
local builtin = require('telescope.builtin')
vim.keymap.set('n', '<leader>ff', builtin.find_files, {})
vim.keymap.set('n', '<leader>fg', builtin.live_grep, {})
vim.keymap.set('n', '<leader>fb', builtin.buffers, {})
vim.keymap.set('n', '<leader>fh', builtin.help_tags, {})
end,
} }
use { use {
@ -43,7 +41,6 @@ require('packer').startup(function(use)
require('orgmode').setup_ts_grammar() require('orgmode').setup_ts_grammar()
require'nvim-treesitter.configs'.setup { 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 = { highlight = {
enable = true, enable = true,
additional_vim_regex_highlighting = {'org'}, -- Required for spellcheck, some LaTex highlights and code block highlights that do not have ts grammar additional_vim_regex_highlighting = {'org'}, -- Required for spellcheck, some LaTex highlights and code block highlights that do not have ts grammar
@ -82,16 +79,10 @@ require('packer').startup(function(use)
config = function() require('lualine').setup() end config = function() require('lualine').setup() end
} }
use "folke/neodev.nvim"
use { use {
"folke/which-key.nvim", "folke/which-key.nvim",
config = function() config = function()
require("which-key").setup({ require("which-key").setup()
plugins = {
spelling = { enabled = true }
}
})
end end
} }
@ -101,21 +92,16 @@ require('packer').startup(function(use)
requires = 'kyazdani42/nvim-web-devicons', requires = 'kyazdani42/nvim-web-devicons',
config = function() config = function()
require("bufferline").setup() require("bufferline").setup()
vim.keymap.set("n", "<S-l>", ":BufferLineCycleNext<cr>", { silent = true })
vim.keymap.set("n", "<S-h>", ":BufferLineCyclePrev<cr>", { silent = true })
end end
} }
use 'nvim-tree/nvim-web-devicons'
use { use {
'nvim-tree/nvim-tree.lua', 'nvim-tree/nvim-tree.lua',
requires = { requires = { 'nvim-tree/nvim-web-devicons' },
'nvim-tree/nvim-web-devicons', -- optional, for file icons
},
tag = 'nightly', -- optional, updated every week. (see issue #1193) tag = 'nightly', -- optional, updated every week. (see issue #1193)
config = function() config = function()
require("nvim-tree").setup() require("nvim-tree").setup()
vim.keymap.set('n', '<leader>e', ":NvimTreeToggle<cr>", { silent = true })
end end
} }
@ -124,6 +110,9 @@ require('packer').startup(function(use)
event = "VimEnter", event = "VimEnter",
config = function() config = function()
require("noice").setup() require("noice").setup()
require("notify").setup({
background_colour = "#000000" -- #1a1b26",
})
end, end,
requires = { requires = {
"MunifTanjim/nui.nvim", "MunifTanjim/nui.nvim",
@ -248,14 +237,11 @@ require('packer').startup(function(use)
end end
} }
use 'nvim-tree/nvim-web-devicons'
use { use {
'goolord/alpha-nvim', 'goolord/alpha-nvim',
requires = { 'kyazdani42/nvim-web-devicons' }, requires = { 'kyazdani42/nvim-web-devicons' },
config = function() config = function()
require'alpha'.setup(require'alpha.themes.startify'.config) require'alpha'.setup(require'alpha.themes.startify'.config)
vim.keymap.set('n', '<leader>;', ":Alpha<cr>", { silent = true })
end end
} }
@ -266,8 +252,6 @@ require('packer').startup(function(use)
end end
} }
use 'LnL7/vim-nix'
use { use {
'alexghergh/nvim-tmux-navigation', config = function() 'alexghergh/nvim-tmux-navigation', config = function()
require'nvim-tmux-navigation'.setup { require'nvim-tmux-navigation'.setup {
@ -297,8 +281,6 @@ require('packer').startup(function(use)
requires = { "nvim-lua/plenary.nvim" } requires = { "nvim-lua/plenary.nvim" }
} }
use "lukas-reineke/indent-blankline.nvim"
use { use {
"akinsho/toggleterm.nvim", tag = '*', config = function() "akinsho/toggleterm.nvim", tag = '*', config = function()
require("toggleterm").setup({ require("toggleterm").setup({
@ -311,8 +293,6 @@ require('packer').startup(function(use)
end end
} }
use 'mfussenegger/nvim-dap'
use { use {
'ggandor/leap.nvim', 'ggandor/leap.nvim',
config = function() config = function()
@ -320,26 +300,40 @@ require('packer').startup(function(use)
end end
} }
use 'tpope/vim-surround'
use 'tpope/vim-repeat'
use 'felipec/vim-sanegx'
use { 'sindrets/diffview.nvim', requires = 'nvim-lua/plenary.nvim' }
use { use {
"folke/trouble.nvim", "folke/trouble.nvim",
requires = "kyazdani42/nvim-web-devicons", requires = "kyazdani42/nvim-web-devicons",
config = function() config = function()
require("trouble").setup({ require("trouble").setup()
vim.keymap.set('n', '<leader>t', ":TroubleToggle<cr>", { silent = true })
})
end
}
use {
'dhruvasagar/vim-table-mode',
config = function()
vim.keymap.set('n', '<leader>TT', ":Tableize<cr>", { silent = true })
end end
} }
end) end)
local wk = require("which-key")
wk.register({
["<leader>"] = {
f = {
name = "Find",
f = { "<cmd>Telescope find_files<cr>", "Files" },
g = { "<cmd>Telescope live_grep<cr>", "Grep" },
r = { "<cmd>Telescope oldfiles<cr>", "Recent Files" },
b = { "<cmd>Telescope buffers<cr>", "Buffers" },
},
b = {
name = "buffer",
d = { ":bdelete!<cr>", "Delete" },
},
e = { ":NvimTreeToggle<cr>", "File Tree" },
t = {
name = "Table",
t = { ":TableModeRealign", "Realign" },
},
S = { ":source %<cr>", "Source current file" },
T = { ":TroubleToggle<cr>", "Trouble" },
ps = { ":PackerSync<cr>", "Packer Sync" },
[";"] = { ":Alpha<cr>", "Alpha" },
},
["<S-l>"] = { ":BufferLineCycleNext<cr>", "Next Tab" },
["<S-h>"] = { ":BufferLineCyclePrev<cr>", "Previous Tab" },
})

Loading…
Cancel
Save