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()
|
||||
use 'wbthomason/packer.nvim'
|
||||
require('packer').startup(function()
|
||||
use 'wbthomason/packer.nvim'
|
||||
|
||||
-- Utilities
|
||||
use 'cakebaker/scss-syntax.vim'
|
||||
use 'christoomey/vim-sort-motion'
|
||||
use 'christoomey/vim-tmux-navigator'
|
||||
use 'editorconfig/editorconfig-vim'
|
||||
use 'icatalina/vim-case-change'
|
||||
use 'kyazdani42/nvim-web-devicons'
|
||||
use 'lewis6991/gitsigns.nvim'
|
||||
use 'lukas-reineke/indent-blankline.nvim'
|
||||
use 'machakann/vim-highlightedyank'
|
||||
use 'miyakogi/seiya.vim'
|
||||
use 'norcalli/nvim-colorizer.lua'
|
||||
use 'nvim-lua/plenary.nvim'
|
||||
use 'nvim-lua/popup.nvim'
|
||||
use 'preservim/nerdcommenter'
|
||||
use 'sheerun/vim-polyglot'
|
||||
use 'tpope/vim-surround'
|
||||
use 'vim-test/vim-test'
|
||||
use 'voldikss/vim-floaterm'
|
||||
use { 'mg979/vim-visual-multi', branch = 'master' }
|
||||
-- Utilities
|
||||
use 'cakebaker/scss-syntax.vim'
|
||||
use 'christoomey/vim-sort-motion'
|
||||
use 'christoomey/vim-tmux-navigator'
|
||||
use 'editorconfig/editorconfig-vim'
|
||||
use 'icatalina/vim-case-change'
|
||||
use 'kyazdani42/nvim-web-devicons'
|
||||
use 'lewis6991/gitsigns.nvim'
|
||||
use 'lukas-reineke/indent-blankline.nvim'
|
||||
use 'machakann/vim-highlightedyank'
|
||||
use 'miyakogi/seiya.vim'
|
||||
use 'norcalli/nvim-colorizer.lua'
|
||||
use 'nvim-lua/plenary.nvim'
|
||||
use 'nvim-lua/popup.nvim'
|
||||
use 'preservim/nerdcommenter'
|
||||
use 'sheerun/vim-polyglot'
|
||||
use 'tpope/vim-surround'
|
||||
use 'vim-test/vim-test'
|
||||
use 'voldikss/vim-floaterm'
|
||||
use { 'mg979/vim-visual-multi', branch = 'master' }
|
||||
|
||||
-- Themes
|
||||
use {
|
||||
'tjdevries/gruvbuddy.nvim',
|
||||
requires = {
|
||||
'tjdevries/colorbuddy.vim'
|
||||
},
|
||||
}
|
||||
-- Themes
|
||||
use {
|
||||
'tjdevries/gruvbuddy.nvim',
|
||||
requires = {
|
||||
'tjdevries/colorbuddy.vim'
|
||||
},
|
||||
}
|
||||
|
||||
-- Navigation
|
||||
use 'ThePrimeagen/harpoon'
|
||||
-- Navigation
|
||||
use 'ThePrimeagen/harpoon'
|
||||
|
||||
-- Treesitter
|
||||
use 'JoosepAlviste/nvim-ts-context-commentstring'
|
||||
use {
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
run = ':TSUpdate',
|
||||
}
|
||||
-- Treesitter
|
||||
use 'JoosepAlviste/nvim-ts-context-commentstring'
|
||||
use {
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
run = ':TSUpdate',
|
||||
}
|
||||
|
||||
-- Completion
|
||||
use {
|
||||
'hrsh7th/nvim-cmp',
|
||||
requires = {
|
||||
'L3MON4D3/LuaSnip',
|
||||
'hrsh7th/cmp-buffer',
|
||||
'hrsh7th/cmp-nvim-lsp',
|
||||
'hrsh7th/cmp-path',
|
||||
'onsails/lspkind-nvim',
|
||||
'saadparwaiz1/cmp_luasnip',
|
||||
{
|
||||
'tzachar/cmp-tabnine',
|
||||
run = './install.sh'
|
||||
}
|
||||
-- Completion
|
||||
use {
|
||||
'hrsh7th/nvim-cmp',
|
||||
requires = {
|
||||
'L3MON4D3/LuaSnip',
|
||||
'hrsh7th/cmp-buffer',
|
||||
'hrsh7th/cmp-nvim-lsp',
|
||||
'hrsh7th/cmp-path',
|
||||
'onsails/lspkind-nvim',
|
||||
'saadparwaiz1/cmp_luasnip',
|
||||
{
|
||||
'tzachar/cmp-tabnine',
|
||||
run = './install.sh'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
-- LSP
|
||||
use 'neovim/nvim-lspconfig'
|
||||
-- LSP
|
||||
use 'neovim/nvim-lspconfig'
|
||||
|
||||
-- Telescope
|
||||
use 'nvim-telescope/telescope.nvim'
|
||||
use { 'nvim-telescope/telescope-fzf-native.nvim', run = 'make' }
|
||||
-- Telescope
|
||||
use 'nvim-telescope/telescope.nvim'
|
||||
use { 'nvim-telescope/telescope-fzf-native.nvim', run = 'make' }
|
||||
|
||||
use 'vimwiki/vimwiki'
|
||||
end)
|
||||
end
|
||||
|
||||
local function init()
|
||||
packer_startup()
|
||||
end
|
||||
|
||||
return {
|
||||
init = init
|
||||
}
|
||||
use 'vimwiki/vimwiki'
|
||||
end)
|
||||
|
|
|
@ -94,14 +94,12 @@ local function set_vim_o()
|
|||
end
|
||||
|
||||
local function init()
|
||||
set_vim_g()
|
||||
set_vim_o()
|
||||
set_key_mappings()
|
||||
set_autocmd()
|
||||
set_filetypes()
|
||||
set_highlights()
|
||||
set_key_mappings()
|
||||
set_vim_g()
|
||||
set_vim_o()
|
||||
end
|
||||
|
||||
return {
|
||||
init = init
|
||||
}
|
||||
init()
|
||||
|
|
Loading…
Reference in a new issue