refactor(nvim): finish restructuring lua files
This completes what I started in commit
0786ed3b3d
, refactoring the lua code by
restructuring the directories and removing the `init` functions at the
bottom of each file.
This commit is contained in:
parent
4eb19130a9
commit
af6d7d8b4e
|
@ -1 +1,3 @@
|
||||||
require 'opdavies'.init()
|
require "opdavies.vim"
|
||||||
|
|
||||||
|
require "opdavies.packer"
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
local function init()
|
|
||||||
require 'opdavies.vim'.init()
|
|
||||||
require 'opdavies.packer'.init()
|
|
||||||
end
|
|
||||||
|
|
||||||
return {
|
|
||||||
init = init
|
|
||||||
}
|
|
|
@ -1,78 +1,68 @@
|
||||||
local function packer_startup()
|
require('packer').startup(function()
|
||||||
require('packer').startup(function()
|
use 'wbthomason/packer.nvim'
|
||||||
use 'wbthomason/packer.nvim'
|
|
||||||
|
|
||||||
-- Utilities
|
-- Utilities
|
||||||
use 'cakebaker/scss-syntax.vim'
|
use 'cakebaker/scss-syntax.vim'
|
||||||
use 'christoomey/vim-sort-motion'
|
use 'christoomey/vim-sort-motion'
|
||||||
use 'christoomey/vim-tmux-navigator'
|
use 'christoomey/vim-tmux-navigator'
|
||||||
use 'editorconfig/editorconfig-vim'
|
use 'editorconfig/editorconfig-vim'
|
||||||
use 'icatalina/vim-case-change'
|
use 'icatalina/vim-case-change'
|
||||||
use 'kyazdani42/nvim-web-devicons'
|
use 'kyazdani42/nvim-web-devicons'
|
||||||
use 'lewis6991/gitsigns.nvim'
|
use 'lewis6991/gitsigns.nvim'
|
||||||
use 'lukas-reineke/indent-blankline.nvim'
|
use 'lukas-reineke/indent-blankline.nvim'
|
||||||
use 'machakann/vim-highlightedyank'
|
use 'machakann/vim-highlightedyank'
|
||||||
use 'miyakogi/seiya.vim'
|
use 'miyakogi/seiya.vim'
|
||||||
use 'norcalli/nvim-colorizer.lua'
|
use 'norcalli/nvim-colorizer.lua'
|
||||||
use 'nvim-lua/plenary.nvim'
|
use 'nvim-lua/plenary.nvim'
|
||||||
use 'nvim-lua/popup.nvim'
|
use 'nvim-lua/popup.nvim'
|
||||||
use 'preservim/nerdcommenter'
|
use 'preservim/nerdcommenter'
|
||||||
use 'sheerun/vim-polyglot'
|
use 'sheerun/vim-polyglot'
|
||||||
use 'tpope/vim-surround'
|
use 'tpope/vim-surround'
|
||||||
use 'vim-test/vim-test'
|
use 'vim-test/vim-test'
|
||||||
use 'voldikss/vim-floaterm'
|
use 'voldikss/vim-floaterm'
|
||||||
use { 'mg979/vim-visual-multi', branch = 'master' }
|
use { 'mg979/vim-visual-multi', branch = 'master' }
|
||||||
|
|
||||||
-- Themes
|
-- Themes
|
||||||
use {
|
use {
|
||||||
'tjdevries/gruvbuddy.nvim',
|
'tjdevries/gruvbuddy.nvim',
|
||||||
requires = {
|
requires = {
|
||||||
'tjdevries/colorbuddy.vim'
|
'tjdevries/colorbuddy.vim'
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Navigation
|
-- Navigation
|
||||||
use 'ThePrimeagen/harpoon'
|
use 'ThePrimeagen/harpoon'
|
||||||
|
|
||||||
-- Treesitter
|
-- Treesitter
|
||||||
use 'JoosepAlviste/nvim-ts-context-commentstring'
|
use 'JoosepAlviste/nvim-ts-context-commentstring'
|
||||||
use {
|
use {
|
||||||
'nvim-treesitter/nvim-treesitter',
|
'nvim-treesitter/nvim-treesitter',
|
||||||
run = ':TSUpdate',
|
run = ':TSUpdate',
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Completion
|
-- Completion
|
||||||
use {
|
use {
|
||||||
'hrsh7th/nvim-cmp',
|
'hrsh7th/nvim-cmp',
|
||||||
requires = {
|
requires = {
|
||||||
'L3MON4D3/LuaSnip',
|
'L3MON4D3/LuaSnip',
|
||||||
'hrsh7th/cmp-buffer',
|
'hrsh7th/cmp-buffer',
|
||||||
'hrsh7th/cmp-nvim-lsp',
|
'hrsh7th/cmp-nvim-lsp',
|
||||||
'hrsh7th/cmp-path',
|
'hrsh7th/cmp-path',
|
||||||
'onsails/lspkind-nvim',
|
'onsails/lspkind-nvim',
|
||||||
'saadparwaiz1/cmp_luasnip',
|
'saadparwaiz1/cmp_luasnip',
|
||||||
{
|
{
|
||||||
'tzachar/cmp-tabnine',
|
'tzachar/cmp-tabnine',
|
||||||
run = './install.sh'
|
run = './install.sh'
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
-- LSP
|
-- LSP
|
||||||
use 'neovim/nvim-lspconfig'
|
use 'neovim/nvim-lspconfig'
|
||||||
|
|
||||||
-- Telescope
|
-- Telescope
|
||||||
use 'nvim-telescope/telescope.nvim'
|
use 'nvim-telescope/telescope.nvim'
|
||||||
use { 'nvim-telescope/telescope-fzf-native.nvim', run = 'make' }
|
use { 'nvim-telescope/telescope-fzf-native.nvim', run = 'make' }
|
||||||
|
|
||||||
use 'vimwiki/vimwiki'
|
use 'vimwiki/vimwiki'
|
||||||
end)
|
end)
|
||||||
end
|
|
||||||
|
|
||||||
local function init()
|
|
||||||
packer_startup()
|
|
||||||
end
|
|
||||||
|
|
||||||
return {
|
|
||||||
init = init
|
|
||||||
}
|
|
||||||
|
|
|
@ -94,14 +94,12 @@ local function set_vim_o()
|
||||||
end
|
end
|
||||||
|
|
||||||
local function init()
|
local function init()
|
||||||
|
set_vim_g()
|
||||||
|
set_vim_o()
|
||||||
|
set_key_mappings()
|
||||||
set_autocmd()
|
set_autocmd()
|
||||||
set_filetypes()
|
set_filetypes()
|
||||||
set_highlights()
|
set_highlights()
|
||||||
set_key_mappings()
|
|
||||||
set_vim_g()
|
|
||||||
set_vim_o()
|
|
||||||
end
|
end
|
||||||
|
|
||||||
return {
|
init()
|
||||||
init = init
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in a new issue