refactor(nvim): restructure lua configuration
This commit is contained in:
parent
603316ab2e
commit
7b756e570a
1
nvim/.config/nvim/init.lua
Normal file
1
nvim/.config/nvim/init.lua
Normal file
|
@ -0,0 +1 @@
|
||||||
|
require 'opdavies'.init()
|
|
@ -1,12 +0,0 @@
|
||||||
function! s:SourceConfigFilesIn(directory)
|
|
||||||
let directory_splat = '~/.config/nvim/' . a:directory . '/*'
|
|
||||||
for config_file in split(glob(directory_splat), '\n')
|
|
||||||
if filereadable(config_file)
|
|
||||||
execute 'source' config_file
|
|
||||||
endif
|
|
||||||
endfor
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
lua require("opdavies")
|
|
||||||
|
|
||||||
call s:SourceConfigFilesIn('plugins')
|
|
|
@ -1,126 +1,8 @@
|
||||||
vim.g.mapleader = ' '
|
local function init()
|
||||||
|
require 'opdavies.vim'.init()
|
||||||
|
require 'opdavies.packer'.init()
|
||||||
|
end
|
||||||
|
|
||||||
vim.cmd[[
|
return {
|
||||||
syntax on
|
init = init
|
||||||
|
}
|
||||||
filetype indent on
|
|
||||||
filetype on
|
|
||||||
filetype plugin on
|
|
||||||
|
|
||||||
autocmd BufRead,BufNewFile *.test set filetype=php
|
|
||||||
autocmd FileType gitcommit highlight ColorColumn ctermbg=8
|
|
||||||
autocmd FileType gitcommit setlocal colorcolumn=50,72
|
|
||||||
autocmd FileType gitcommit setlocal spell
|
|
||||||
autocmd FileType gitcommit setlocal textwidth=72
|
|
||||||
|
|
||||||
highlight Comment cterm=italic gui=italic
|
|
||||||
]]
|
|
||||||
|
|
||||||
vim.o.autoindent = true
|
|
||||||
vim.o.breakindent = true
|
|
||||||
vim.o.expandtab = true
|
|
||||||
vim.o.foldlevelstart = 99
|
|
||||||
vim.o.foldmethod = 'indent'
|
|
||||||
vim.o.formatoptions = 'lm'
|
|
||||||
vim.o.linebreak = true
|
|
||||||
vim.o.mouse = 'n'
|
|
||||||
vim.o.number = true
|
|
||||||
vim.o.relativenumber = true
|
|
||||||
vim.o.scrolloff = 10
|
|
||||||
vim.o.shiftwidth = 2
|
|
||||||
vim.o.smartindent = true
|
|
||||||
vim.o.softtabstop = 2
|
|
||||||
vim.o.swapfile = false
|
|
||||||
vim.o.tabstop = 2
|
|
||||||
vim.o.termguicolors = true
|
|
||||||
vim.o.updatetime = 1000
|
|
||||||
vim.o.wrap = true
|
|
||||||
|
|
||||||
vim.opt.clipboard:append 'unnamedplus'
|
|
||||||
|
|
||||||
local map = vim.api.nvim_set_keymap
|
|
||||||
|
|
||||||
local options = { noremap = true }
|
|
||||||
|
|
||||||
map('n', '<Leader>so', ':so ~/.config/nvim/init.vim<Cr>', options)
|
|
||||||
|
|
||||||
-- Make the current file executable
|
|
||||||
map('n', '<Leader>x', ':!chmod +x %<Cr>', options)
|
|
||||||
|
|
||||||
-- Yank from the current column to the end of the line
|
|
||||||
map('n', 'Y', 'yg$', options)
|
|
||||||
|
|
||||||
-- Keep things centred
|
|
||||||
map('n', 'n', 'nzzzv', options)
|
|
||||||
map('n', 'N', 'Nzzzv', options)
|
|
||||||
|
|
||||||
-- Remove arrow keys
|
|
||||||
map('v', '<down>', '<nop>', options)
|
|
||||||
map('v', '<left>', '<nop>', options)
|
|
||||||
map('v', '<right>', '<nop>', options)
|
|
||||||
map('v', '<up>', '<nop>', options)
|
|
||||||
|
|
||||||
-- Clears hlsearch after doing a search, otherwise just does normal <CR> stuff
|
|
||||||
vim.cmd[[ nnoremap <expr> <CR> {-> v:hlsearch ? ":nohl\<CR>" : "\<CR>"}() ]]
|
|
||||||
|
|
||||||
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 '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 'arcticicestudio/nord-vim'
|
|
||||||
use 'nanotech/jellybeans.vim'
|
|
||||||
use 'tjdevries/colorbuddy.vim'
|
|
||||||
use 'tjdevries/gruvbuddy.nvim'
|
|
||||||
|
|
||||||
-- Navigation
|
|
||||||
use 'ThePrimeagen/harpoon'
|
|
||||||
|
|
||||||
-- Treesitter
|
|
||||||
use 'JoosepAlviste/nvim-ts-context-commentstring'
|
|
||||||
use { 'nvim-treesitter/nvim-treesitter', run = ':TSUpdate' }
|
|
||||||
|
|
||||||
-- Completion
|
|
||||||
use 'L3MON4D3/LuaSnip'
|
|
||||||
use 'hrsh7th/cmp-buffer'
|
|
||||||
use 'hrsh7th/cmp-nvim-lsp'
|
|
||||||
use 'hrsh7th/cmp-path'
|
|
||||||
use 'hrsh7th/nvim-cmp'
|
|
||||||
use 'onsails/lspkind-nvim'
|
|
||||||
use 'saadparwaiz1/cmp_luasnip'
|
|
||||||
use { 'tzachar/cmp-tabnine', run = './install.sh' }
|
|
||||||
|
|
||||||
-- LSP
|
|
||||||
use 'neovim/nvim-lspconfig'
|
|
||||||
|
|
||||||
-- Telescope
|
|
||||||
use 'nvim-telescope/telescope.nvim'
|
|
||||||
use { 'nvim-telescope/telescope-fzf-native.nvim', run = 'make' }
|
|
||||||
end)
|
|
||||||
|
|
||||||
require "opdavies.plugins.colours"
|
|
||||||
require "opdavies.plugins.completion"
|
|
||||||
require "opdavies.plugins.floaterm"
|
|
||||||
require "opdavies.plugins.indent-blankline"
|
|
||||||
require "opdavies.plugins.lsp"
|
|
||||||
require "opdavies.plugins.signs"
|
|
||||||
require "opdavies.plugins.treesitter"
|
|
||||||
|
|
119
nvim/.config/nvim/lua/opdavies/packer.lua
Normal file
119
nvim/.config/nvim/lua/opdavies/packer.lua
Normal file
|
@ -0,0 +1,119 @@
|
||||||
|
local function packer_startup()
|
||||||
|
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 {
|
||||||
|
'lewis6991/gitsigns.nvim',
|
||||||
|
config = function()
|
||||||
|
require 'opdavies.plugins.gitsigns'.init()
|
||||||
|
end
|
||||||
|
}
|
||||||
|
use {
|
||||||
|
'lukas-reineke/indent-blankline.nvim',
|
||||||
|
config = function()
|
||||||
|
require 'opdavies.plugins.indent-blankline'.init()
|
||||||
|
end
|
||||||
|
}
|
||||||
|
use 'machakann/vim-highlightedyank'
|
||||||
|
use {
|
||||||
|
'miyakogi/seiya.vim',
|
||||||
|
config = function()
|
||||||
|
require 'opdavies.plugins.seiya'.init()
|
||||||
|
end
|
||||||
|
}
|
||||||
|
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',
|
||||||
|
config = function ()
|
||||||
|
require 'opdavies.plugins.vim-test'.init()
|
||||||
|
end
|
||||||
|
}
|
||||||
|
use {
|
||||||
|
'voldikss/vim-floaterm',
|
||||||
|
config = function()
|
||||||
|
require 'opdavies.plugins.floaterm'.init()
|
||||||
|
end
|
||||||
|
}
|
||||||
|
use { 'mg979/vim-visual-multi', branch = 'master' }
|
||||||
|
|
||||||
|
-- Themes
|
||||||
|
use {
|
||||||
|
'tjdevries/gruvbuddy.nvim',
|
||||||
|
requires = {
|
||||||
|
'tjdevries/colorbuddy.vim'
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
require 'opdavies.plugins.colours'.init()
|
||||||
|
end
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Navigation
|
||||||
|
use 'ThePrimeagen/harpoon'
|
||||||
|
|
||||||
|
-- Treesitter
|
||||||
|
use 'JoosepAlviste/nvim-ts-context-commentstring'
|
||||||
|
use {
|
||||||
|
'nvim-treesitter/nvim-treesitter',
|
||||||
|
run = ':TSUpdate',
|
||||||
|
config = function()
|
||||||
|
require 'opdavies.plugins.treesitter'.init()
|
||||||
|
end
|
||||||
|
}
|
||||||
|
|
||||||
|
-- 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'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
config = {
|
||||||
|
require 'opdavies.plugins.completion'.init()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
-- LSP
|
||||||
|
use {
|
||||||
|
'neovim/nvim-lspconfig',
|
||||||
|
config = function()
|
||||||
|
require 'opdavies.plugins.lspconfig'.init()
|
||||||
|
end
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Telescope
|
||||||
|
use {
|
||||||
|
'nvim-telescope/telescope.nvim',
|
||||||
|
config = function ()
|
||||||
|
require 'opdavies.plugins.telescope'.init()
|
||||||
|
end
|
||||||
|
}
|
||||||
|
use { 'nvim-telescope/telescope-fzf-native.nvim', run = 'make' }
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
|
local function init()
|
||||||
|
packer_startup()
|
||||||
|
end
|
||||||
|
|
||||||
|
return {
|
||||||
|
init = init
|
||||||
|
}
|
|
@ -1,3 +1,9 @@
|
||||||
require("colorbuddy").colorscheme("gruvbuddy")
|
local function init()
|
||||||
|
require("colorbuddy").colorscheme("gruvbuddy")
|
||||||
|
|
||||||
require'colorizer'.setup()
|
require'colorizer'.setup()
|
||||||
|
end
|
||||||
|
|
||||||
|
return {
|
||||||
|
init = init
|
||||||
|
}
|
||||||
|
|
|
@ -1,50 +1,56 @@
|
||||||
local cmp = require "cmp"
|
local cmp = require "cmp"
|
||||||
|
|
||||||
cmp.setup {
|
local function init()
|
||||||
snippet = {
|
cmp.setup {
|
||||||
expand = function(args)
|
snippet = {
|
||||||
require('luasnip').lsp_expand(args.body)
|
expand = function(args)
|
||||||
end
|
require('luasnip').lsp_expand(args.body)
|
||||||
},
|
end
|
||||||
|
|
||||||
mapping = {
|
|
||||||
["<C-d>"] = cmp.mapping.scroll_docs(-4),
|
|
||||||
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
|
||||||
["<C-e>"] = cmp.mapping.close(),
|
|
||||||
["<c-y>"] = cmp.mapping.confirm {
|
|
||||||
behavior = cmp.ConfirmBehavior.Insert,
|
|
||||||
select = true,
|
|
||||||
},
|
},
|
||||||
},
|
|
||||||
|
|
||||||
sources = {
|
mapping = {
|
||||||
{ name = "buffer", priority = 2, keyword_length = 5, max_item_count = 5 },
|
["<C-d>"] = cmp.mapping.scroll_docs(-4),
|
||||||
{ name = "calc" },
|
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
||||||
{ name = "path" },
|
["<C-e>"] = cmp.mapping.close(),
|
||||||
{ name = "spell" },
|
["<c-y>"] = cmp.mapping.confirm {
|
||||||
{ name = "treesitter" },
|
behavior = cmp.ConfirmBehavior.Insert,
|
||||||
|
select = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
-- Neovim
|
sources = {
|
||||||
{ name = "nvim_lsp", priority = 10 },
|
{ name = "buffer", priority = 2, keyword_length = 5, max_item_count = 5 },
|
||||||
{ name = "nvim_lua" },
|
{ name = "calc" },
|
||||||
|
{ name = "path" },
|
||||||
|
{ name = "spell" },
|
||||||
|
{ name = "treesitter" },
|
||||||
|
|
||||||
-- Plugins
|
-- Neovim
|
||||||
{ name = "luasnip" },
|
{ name = "nvim_lsp", priority = 10 },
|
||||||
{ name = "cmp_tabnine" },
|
{ name = "nvim_lua" },
|
||||||
},
|
|
||||||
|
|
||||||
formatting = {
|
-- Plugins
|
||||||
format = require("lspkind").cmp_format({with_text = true, menu = ({
|
{ name = "luasnip" },
|
||||||
buffer = "[buf]",
|
{ name = "cmp_tabnine" },
|
||||||
cmp_tabnine = "[tn]",
|
},
|
||||||
luasnip = "[snip]",
|
|
||||||
nvim_lsp = "[lsp]",
|
|
||||||
nvim_lua = "[lua]",
|
|
||||||
path = "[path]",
|
|
||||||
})}),
|
|
||||||
},
|
|
||||||
|
|
||||||
experimental = {
|
formatting = {
|
||||||
ghost_text = true
|
format = require("lspkind").cmp_format({with_text = true, menu = ({
|
||||||
},
|
buffer = "[buf]",
|
||||||
|
cmp_tabnine = "[tn]",
|
||||||
|
luasnip = "[snip]",
|
||||||
|
nvim_lsp = "[lsp]",
|
||||||
|
nvim_lua = "[lua]",
|
||||||
|
path = "[path]",
|
||||||
|
})}),
|
||||||
|
},
|
||||||
|
|
||||||
|
experimental = {
|
||||||
|
ghost_text = true
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return {
|
||||||
|
init = init
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,14 @@
|
||||||
local map = vim.api.nvim_set_keymap
|
local function init()
|
||||||
|
local map = vim.api.nvim_set_keymap
|
||||||
|
|
||||||
local options = { noremap = true }
|
local options = { noremap = true }
|
||||||
|
|
||||||
map('n', '<leader>ld', '<CMD>FloatermNew --autoclose=2 --height=0.9 --width=0.9 lazydocker<CR>', options)
|
map('n', '<leader>ld', '<cmd>FloatermNew --autoclose=2 --height=0.9 --width=0.9 lazydocker<cr>', options)
|
||||||
map('n', '<leader>lg', '<CMD>FloatermNew --autoclose=2 --height=0.9 --width=0.9 lazygit<CR>', options)
|
map('n', '<leader>lg', '<cmd>FloatermNew --autoclose=2 --height=0.9 --width=0.9 lazygit<cr>', options)
|
||||||
map('n', '<leader>nn', '<CMD>FloatermNew --autoclose=2 --height=0.5 --width=0.5 nnn -Hde<CR>', options)
|
map('n', '<leader>nn', '<cmd>FloatermNew --autoclose=2 --height=0.5 --width=0.5 nnn -Hde<cr>', options)
|
||||||
map('n', '<leader>tt', '<CMD>FloatermNew --autoclose=2 --height=0.9 --width=0.9 zsh<CR>', options)
|
map('n', '<leader>tt', '<cmd>FloatermNew --autoclose=2 --height=0.9 --width=0.9 zsh<cr>', options)
|
||||||
|
end
|
||||||
|
|
||||||
|
return {
|
||||||
|
init = init
|
||||||
|
}
|
||||||
|
|
29
nvim/.config/nvim/lua/opdavies/plugins/gitsigns.lua
Normal file
29
nvim/.config/nvim/lua/opdavies/plugins/gitsigns.lua
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
require "colorbuddy"
|
||||||
|
|
||||||
|
local function init()
|
||||||
|
local c = require("colorbuddy.color").colors
|
||||||
|
local Group = require("colorbuddy.group").Group
|
||||||
|
|
||||||
|
Group.new("GitSignsAdd", c.green)
|
||||||
|
Group.new("GitSignsChange", c.yellow)
|
||||||
|
Group.new("GitSignsDelete", c.red)
|
||||||
|
|
||||||
|
require 'gitsigns'.setup {
|
||||||
|
linehl = false,
|
||||||
|
numhl = true,
|
||||||
|
|
||||||
|
signs = {
|
||||||
|
add = { hl = "GitSignsAdd", text = "│", numhl = "GitSignsAddNr" },
|
||||||
|
change = { hl = "GitSignsChange", text = "│", numhl = "GitSignsChangeNr" },
|
||||||
|
delete = { hl = "GitSignsDelete", text = "_", numhl = "GitSignsDeleteNr" },
|
||||||
|
topdelete = { hl = "GitSignsDelete", text = "‾", numhl = "GitSignsDeleteNr" },
|
||||||
|
changedelete = { hl = "GitSignsDelete", text = "~", numhl = "GitSignsChangeNr" },
|
||||||
|
},
|
||||||
|
|
||||||
|
word_diff = false,
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return {
|
||||||
|
init = init
|
||||||
|
}
|
|
@ -1,13 +1,19 @@
|
||||||
vim.opt.list = true
|
local function init()
|
||||||
vim.opt.listchars = {
|
vim.opt.list = true
|
||||||
eol = "↴",
|
vim.opt.listchars = {
|
||||||
}
|
eol = "↴",
|
||||||
|
}
|
||||||
|
|
||||||
vim.cmd [[highlight IndentBlanklineIndent1 guifg=#555555 gui=nocombine]]
|
vim.cmd [[highlight IndentBlanklineIndent1 guifg=#555555 gui=nocombine]]
|
||||||
|
|
||||||
require("indent_blankline").setup {
|
require "indent_blankline".setup {
|
||||||
char_highlight_list = {
|
char_highlight_list = {
|
||||||
"IndentBlanklineIndent1",
|
"IndentBlanklineIndent1",
|
||||||
},
|
},
|
||||||
show_end_of_line = true,
|
show_end_of_line = true,
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return {
|
||||||
|
init = init
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
require "opdavies.plugins.lsp.setup"
|
|
||||||
require "opdavies.plugins.lsp.mappings"
|
|
|
@ -1,16 +0,0 @@
|
||||||
local map_options = {
|
|
||||||
noremap = true,
|
|
||||||
silent = true,
|
|
||||||
}
|
|
||||||
|
|
||||||
vim.api.nvim_set_keymap('n', '<leader>vb', ':lua require"telescope.builtin".buffers()<CR>', map_options)
|
|
||||||
vim.api.nvim_set_keymap('n', '<leader>vca', ':lua vim.lsp.buf.code_action()<CR>', map_options)
|
|
||||||
vim.api.nvim_set_keymap('n', '<leader>vd', ':lua vim.lsp.buf.definition()<CR>', map_options)
|
|
||||||
vim.api.nvim_set_keymap('n', '<leader>vh', ':lua vim.lsp.buf.hover()<CR>', map_options)
|
|
||||||
vim.api.nvim_set_keymap('n', '<leader>vi', ':lua vim.lsp.buf.implementation()<CR>', map_options)
|
|
||||||
vim.api.nvim_set_keymap('n', '<leader>vn', ':lua vim.lsp.diagnostic.goto_next()<CR>', map_options)
|
|
||||||
vim.api.nvim_set_keymap('n', '<leader>vrn', ':lua vim.lsp.buf.rename()<CR>', map_options)
|
|
||||||
vim.api.nvim_set_keymap('n', '<leader>vrr', ':lua vim.lsp.buf.references()<CR>', map_options)
|
|
||||||
vim.api.nvim_set_keymap('n', '<leader>vs', ':lua require"telescope.builtin".live_grep()<CR>', map_options)
|
|
||||||
vim.api.nvim_set_keymap('n', '<leader>vsd', ':lua vim.lsp.diagnostic.show_line_diagnostics(); vim.lsp.util.show_line_diagnostics()<CR>', map_options)
|
|
||||||
vim.api.nvim_set_keymap('n', '<leader>vsh', ':lua vim.lsp.buf.signature_help()<CR>', map_options)
|
|
|
@ -1,36 +0,0 @@
|
||||||
--local has_lsp, lspconfig = pcall(require, "lspconfig")
|
|
||||||
|
|
||||||
local function config(_config)
|
|
||||||
return vim.tbl_deep_extend("force", {
|
|
||||||
capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities())
|
|
||||||
}, _config or {})
|
|
||||||
end
|
|
||||||
|
|
||||||
require'lspconfig'.ansiblels.setup(config())
|
|
||||||
|
|
||||||
require'lspconfig'.bashls.setup(config())
|
|
||||||
|
|
||||||
require'lspconfig'.cssls.setup(config())
|
|
||||||
|
|
||||||
require'lspconfig'.html.setup(config())
|
|
||||||
|
|
||||||
require'lspconfig'.intelephense.setup(config({
|
|
||||||
filetypes = { "php", "test", "theme" }
|
|
||||||
}))
|
|
||||||
|
|
||||||
require'lspconfig'.tsserver.setup(config({
|
|
||||||
filetypes = { "javascript", "typescript", "vue" }
|
|
||||||
}))
|
|
||||||
|
|
||||||
require'lspconfig'.vuels.setup(config())
|
|
||||||
|
|
||||||
require'lspconfig'.yamlls.setup(config())
|
|
||||||
|
|
||||||
vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(
|
|
||||||
vim.lsp.diagnostic.on_publish_diagnostics, {
|
|
||||||
underline = true,
|
|
||||||
virtual_text = true,
|
|
||||||
signs = true,
|
|
||||||
update_in_insert = true,
|
|
||||||
}
|
|
||||||
)
|
|
68
nvim/.config/nvim/lua/opdavies/plugins/lspconfig.lua
Normal file
68
nvim/.config/nvim/lua/opdavies/plugins/lspconfig.lua
Normal file
|
@ -0,0 +1,68 @@
|
||||||
|
local function lsp_setup()
|
||||||
|
--local has_lsp, lspconfig = pcall(require, "lspconfig")
|
||||||
|
|
||||||
|
local function config(_config)
|
||||||
|
return vim.tbl_deep_extend("force", {
|
||||||
|
capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities())
|
||||||
|
}, _config or {})
|
||||||
|
end
|
||||||
|
|
||||||
|
require'lspconfig'.ansiblels.setup(config())
|
||||||
|
|
||||||
|
require'lspconfig'.bashls.setup(config())
|
||||||
|
|
||||||
|
require'lspconfig'.cssls.setup(config())
|
||||||
|
|
||||||
|
require'lspconfig'.html.setup(config())
|
||||||
|
|
||||||
|
require'lspconfig'.intelephense.setup(config({
|
||||||
|
filetypes = { "php", "test", "theme" }
|
||||||
|
}))
|
||||||
|
|
||||||
|
require'lspconfig'.tsserver.setup(config({
|
||||||
|
filetypes = { "javascript", "typescript", "vue" }
|
||||||
|
}))
|
||||||
|
|
||||||
|
require'lspconfig'.vuels.setup(config())
|
||||||
|
|
||||||
|
require'lspconfig'.yamlls.setup(config())
|
||||||
|
|
||||||
|
vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(
|
||||||
|
vim.lsp.diagnostic.on_publish_diagnostics, {
|
||||||
|
underline = true,
|
||||||
|
virtual_text = true,
|
||||||
|
signs = true,
|
||||||
|
update_in_insert = true,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
local function key_mappings()
|
||||||
|
local map = vim.api.nvim_set_keymap
|
||||||
|
|
||||||
|
local options = {
|
||||||
|
noremap = true,
|
||||||
|
silent = true,
|
||||||
|
}
|
||||||
|
|
||||||
|
map('n', '<leader>vb', ':lua require"telescope.builtin".buffers()<CR>', options)
|
||||||
|
map('n', '<leader>vca', ':lua vim.lsp.buf.code_action()<CR>', options)
|
||||||
|
map('n', '<leader>vd', ':lua vim.lsp.buf.definition()<CR>', options)
|
||||||
|
map('n', '<leader>vh', ':lua vim.lsp.buf.hover()<CR>', options)
|
||||||
|
map('n', '<leader>vi', ':lua vim.lsp.buf.implementation()<CR>', options)
|
||||||
|
map('n', '<leader>vn', ':lua vim.lsp.diagnostic.goto_next()<CR>', options)
|
||||||
|
map('n', '<leader>vrn', ':lua vim.lsp.buf.rename()<CR>', options)
|
||||||
|
map('n', '<leader>vrr', ':lua vim.lsp.buf.references()<CR>', options)
|
||||||
|
map('n', '<leader>vs', ':lua require"telescope.builtin".live_grep()<CR>', options)
|
||||||
|
map('n', '<leader>vsd', ':lua vim.lsp.diagnostic.show_line_diagnostics(); vim.lsp.util.show_line_diagnostics()<CR>', options)
|
||||||
|
map('n', '<leader>vsh', ':lua vim.lsp.buf.signature_help()<CR>', options)
|
||||||
|
end
|
||||||
|
|
||||||
|
local function init()
|
||||||
|
lsp_setup()
|
||||||
|
key_mappings()
|
||||||
|
end
|
||||||
|
|
||||||
|
return {
|
||||||
|
init = init
|
||||||
|
}
|
9
nvim/.config/nvim/lua/opdavies/plugins/seiya.lua
Normal file
9
nvim/.config/nvim/lua/opdavies/plugins/seiya.lua
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
local function init()
|
||||||
|
vim.g.seiya_auto_enable = 1
|
||||||
|
|
||||||
|
vim.g.seiya_target_groups = { 'guibg' }
|
||||||
|
end
|
||||||
|
|
||||||
|
return {
|
||||||
|
init = init
|
||||||
|
}
|
|
@ -1,23 +0,0 @@
|
||||||
require "colorbuddy"
|
|
||||||
|
|
||||||
local c = require("colorbuddy.color").colors
|
|
||||||
local Group = require("colorbuddy.group").Group
|
|
||||||
|
|
||||||
Group.new("GitSignsAdd", c.green)
|
|
||||||
Group.new("GitSignsChange", c.yellow)
|
|
||||||
Group.new("GitSignsDelete", c.red)
|
|
||||||
|
|
||||||
require 'gitsigns'.setup {
|
|
||||||
linehl = false,
|
|
||||||
numhl = true,
|
|
||||||
|
|
||||||
signs = {
|
|
||||||
add = { hl = "GitSignsAdd", text = "│", numhl = "GitSignsAddNr" },
|
|
||||||
change = { hl = "GitSignsChange", text = "│", numhl = "GitSignsChangeNr" },
|
|
||||||
delete = { hl = "GitSignsDelete", text = "_", numhl = "GitSignsDeleteNr" },
|
|
||||||
topdelete = { hl = "GitSignsDelete", text = "‾", numhl = "GitSignsDeleteNr" },
|
|
||||||
changedelete = { hl = "GitSignsDelete", text = "~", numhl = "GitSignsChangeNr" },
|
|
||||||
},
|
|
||||||
|
|
||||||
word_diff = false,
|
|
||||||
}
|
|
24
nvim/.config/nvim/lua/opdavies/plugins/telescope.lua
Normal file
24
nvim/.config/nvim/lua/opdavies/plugins/telescope.lua
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
local function init()
|
||||||
|
local map = vim.api.nvim_set_keymap
|
||||||
|
|
||||||
|
local options = {
|
||||||
|
noremap = true,
|
||||||
|
silent = true,
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Builtin
|
||||||
|
map('n', '<leader>fb', '<CMD>lua require("telescope.builtin").buffers()<CR>', options)
|
||||||
|
map('n', '<leader>fc', '<CMD>lua require("telescope.builtin").lsp_code_actions()<CR>', options)
|
||||||
|
map('n', '<leader>fd', '<CMD>lua require("telescope.builtin").lsp_workspace_diagnostics()<CR>', options)
|
||||||
|
map('n', '<leader>fe', '<CMD>lua require("telescope.builtin").file_browser{ cwd = vim.fn.expand("%:p:h") }<CR>', options)
|
||||||
|
map('n', '<leader>ff', '<CMD>lua require("telescope.builtin").find_files{ hidden = true }<CR>', options)
|
||||||
|
map('n', '<leader>fg', '<CMD>lua require("telescope.builtin").git_files{}<CR>', options)
|
||||||
|
map('n', '<leader>fh', '<CMD>lua require("telescope.builtin").help_tags()<CR>', options)
|
||||||
|
map('n', '<leader>fl', '<CMD>lua require("telescope.builtin").live_grep()<CR>', options)
|
||||||
|
map('n', '<leader>fr', '<CMD>lua require("telescope.builtin").registers()<CR>', options)
|
||||||
|
map('n', '<leader>fr', '<CMD>lua require("telescope.builtin").registers()<CR>', options)
|
||||||
|
end
|
||||||
|
|
||||||
|
return {
|
||||||
|
init = init
|
||||||
|
}
|
|
@ -1,11 +1,15 @@
|
||||||
local configs = require "nvim-treesitter.configs"
|
local function init()
|
||||||
|
require "nvim-treesitter.configs".setup {
|
||||||
configs.setup {
|
context_commenting = {
|
||||||
context_commenting = {
|
enable = true
|
||||||
enable = true
|
},
|
||||||
},
|
ensure_installed = "maintained",
|
||||||
ensure_installed = "maintained",
|
highlight = {
|
||||||
highlight = {
|
enable = true,
|
||||||
enable = true,
|
}
|
||||||
}
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return {
|
||||||
|
init = init
|
||||||
}
|
}
|
||||||
|
|
19
nvim/.config/nvim/lua/opdavies/plugins/vim-test.lua
Normal file
19
nvim/.config/nvim/lua/opdavies/plugins/vim-test.lua
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
local function init()
|
||||||
|
local map = vim.api.nvim_set_keymap
|
||||||
|
|
||||||
|
local options = {
|
||||||
|
silent = true
|
||||||
|
}
|
||||||
|
|
||||||
|
map('n', 't<C-f>', ':TestFile<CR>', options)
|
||||||
|
map('n', 't<C-g>', ':TestVisit<CR>', options)
|
||||||
|
map('n', 't<C-l>', ':TestLast<CR>', options)
|
||||||
|
map('n', 't<C-n>', ':TestNearest<CR>', options)
|
||||||
|
map('n', 't<C-s>', ':TestSuite<CR>', options)
|
||||||
|
|
||||||
|
vim.g['test#strategy'] = "neovim"
|
||||||
|
end
|
||||||
|
|
||||||
|
return {
|
||||||
|
init = init
|
||||||
|
}
|
103
nvim/.config/nvim/lua/opdavies/vim.lua
Normal file
103
nvim/.config/nvim/lua/opdavies/vim.lua
Normal file
|
@ -0,0 +1,103 @@
|
||||||
|
local function set_autocmd()
|
||||||
|
vim.cmd[[
|
||||||
|
autocmd BufRead,BufNewFile *.test set filetype=php
|
||||||
|
autocmd FileType gitcommit highlight ColorColumn ctermbg=8
|
||||||
|
autocmd FileType gitcommit setlocal colorcolumn=50,72
|
||||||
|
autocmd FileType gitcommit setlocal spell
|
||||||
|
autocmd FileType gitcommit setlocal textwidth=72
|
||||||
|
]]
|
||||||
|
end
|
||||||
|
|
||||||
|
local function set_filetypes()
|
||||||
|
vim.cmd[[
|
||||||
|
filetype indent on
|
||||||
|
filetype on
|
||||||
|
filetype plugin on
|
||||||
|
]]
|
||||||
|
end
|
||||||
|
|
||||||
|
local function set_key_mappings()
|
||||||
|
local map = vim.api.nvim_set_keymap
|
||||||
|
|
||||||
|
local options = { noremap = true }
|
||||||
|
|
||||||
|
map('n', '<Leader>so', ':so ~/.config/nvim/init.vim<Cr>', options)
|
||||||
|
|
||||||
|
-- Make the current file executable
|
||||||
|
map('n', '<Leader>x', ':!chmod +x %<Cr>', options)
|
||||||
|
|
||||||
|
-- Yank from the current column to the end of the line
|
||||||
|
map('n', 'Y', 'yg$', options)
|
||||||
|
|
||||||
|
-- Keep things centred
|
||||||
|
map('n', 'n', 'nzzzv', options)
|
||||||
|
map('n', 'N', 'Nzzzv', options)
|
||||||
|
|
||||||
|
-- Remove arrow keys
|
||||||
|
map('v', '<down>', '<nop>', options)
|
||||||
|
map('v', '<left>', '<nop>', options)
|
||||||
|
map('v', '<right>', '<nop>', options)
|
||||||
|
map('v', '<up>', '<nop>', options)
|
||||||
|
|
||||||
|
-- Clears hlsearch after doing a search, otherwise just does normal <CR> stuff
|
||||||
|
vim.cmd[[ nnoremap <expr> <CR> {-> v:hlsearch ? ":nohl\<CR>" : "\<CR>"}() ]]
|
||||||
|
|
||||||
|
map(
|
||||||
|
'n',
|
||||||
|
'<C-f>',
|
||||||
|
':silent !tmux neww tmux-sessioniser<CR>',
|
||||||
|
{ noremap = true, silent = true }
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
local function set_highlights()
|
||||||
|
vim.cmd[[highlight Comment cterm=italic gui=italic]]
|
||||||
|
end
|
||||||
|
|
||||||
|
local function set_vim_g()
|
||||||
|
vim.g.mapleader = ' '
|
||||||
|
end
|
||||||
|
|
||||||
|
local function set_vim_o()
|
||||||
|
local settings = {
|
||||||
|
autoindent = true,
|
||||||
|
breakindent = true,
|
||||||
|
expandtab = true,
|
||||||
|
foldlevelstart = 99,
|
||||||
|
foldmethod = 'indent',
|
||||||
|
formatoptions = 'lm',
|
||||||
|
linebreak = true,
|
||||||
|
mouse = 'n',
|
||||||
|
number = true,
|
||||||
|
relativenumber = true,
|
||||||
|
scrolloff = 10,
|
||||||
|
shiftwidth = 2,
|
||||||
|
smartindent = true,
|
||||||
|
softtabstop = 2,
|
||||||
|
swapfile = false,
|
||||||
|
syntax = 'on',
|
||||||
|
tabstop = 2,
|
||||||
|
termguicolors = true,
|
||||||
|
updatetime = 1000,
|
||||||
|
wrap = true,
|
||||||
|
}
|
||||||
|
|
||||||
|
for key, value in pairs(settings) do
|
||||||
|
vim.o[key] = value
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.opt.clipboard:append 'unnamedplus'
|
||||||
|
end
|
||||||
|
|
||||||
|
local function init()
|
||||||
|
set_autocmd()
|
||||||
|
set_filetypes()
|
||||||
|
set_highlights()
|
||||||
|
set_key_mappings()
|
||||||
|
set_vim_g()
|
||||||
|
set_vim_o()
|
||||||
|
end
|
||||||
|
|
||||||
|
return {
|
||||||
|
init = init
|
||||||
|
}
|
|
@ -71,151 +71,231 @@ time([[Defining packer_plugins]], true)
|
||||||
_G.packer_plugins = {
|
_G.packer_plugins = {
|
||||||
LuaSnip = {
|
LuaSnip = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/LuaSnip"
|
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/LuaSnip",
|
||||||
|
url = "https://github.com/L3MON4D3/LuaSnip"
|
||||||
},
|
},
|
||||||
["cmp-buffer"] = {
|
["cmp-buffer"] = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/cmp-buffer"
|
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/cmp-buffer",
|
||||||
|
url = "https://github.com/hrsh7th/cmp-buffer"
|
||||||
},
|
},
|
||||||
["cmp-nvim-lsp"] = {
|
["cmp-nvim-lsp"] = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp"
|
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp",
|
||||||
|
url = "https://github.com/hrsh7th/cmp-nvim-lsp"
|
||||||
},
|
},
|
||||||
["cmp-path"] = {
|
["cmp-path"] = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/cmp-path"
|
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/cmp-path",
|
||||||
|
url = "https://github.com/hrsh7th/cmp-path"
|
||||||
},
|
},
|
||||||
["cmp-tabnine"] = {
|
["cmp-tabnine"] = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/cmp-tabnine"
|
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/cmp-tabnine",
|
||||||
|
url = "https://github.com/tzachar/cmp-tabnine"
|
||||||
},
|
},
|
||||||
cmp_luasnip = {
|
cmp_luasnip = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/cmp_luasnip"
|
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/cmp_luasnip",
|
||||||
|
url = "https://github.com/saadparwaiz1/cmp_luasnip"
|
||||||
},
|
},
|
||||||
["colorbuddy.vim"] = {
|
["colorbuddy.vim"] = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/colorbuddy.vim"
|
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/colorbuddy.vim",
|
||||||
|
url = "https://github.com/tjdevries/colorbuddy.vim"
|
||||||
},
|
},
|
||||||
["editorconfig-vim"] = {
|
["editorconfig-vim"] = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/editorconfig-vim"
|
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/editorconfig-vim",
|
||||||
|
url = "https://github.com/editorconfig/editorconfig-vim"
|
||||||
},
|
},
|
||||||
["gitsigns.nvim"] = {
|
["gitsigns.nvim"] = {
|
||||||
|
config = { "\27LJ\2\2F\0\0\2\0\3\0\0066\0\0\0'\1\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\tinit\30opdavies.plugins.gitsigns\frequire\0" },
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/gitsigns.nvim"
|
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/gitsigns.nvim",
|
||||||
|
url = "https://github.com/lewis6991/gitsigns.nvim"
|
||||||
},
|
},
|
||||||
["gruvbuddy.nvim"] = {
|
["gruvbuddy.nvim"] = {
|
||||||
|
config = { "\27LJ\2\2E\0\0\2\0\3\0\0066\0\0\0'\1\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\tinit\29opdavies.plugins.colours\frequire\0" },
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/gruvbuddy.nvim"
|
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/gruvbuddy.nvim",
|
||||||
|
url = "https://github.com/tjdevries/gruvbuddy.nvim"
|
||||||
},
|
},
|
||||||
harpoon = {
|
harpoon = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/harpoon"
|
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/harpoon",
|
||||||
|
url = "https://github.com/ThePrimeagen/harpoon"
|
||||||
},
|
},
|
||||||
["indent-blankline.nvim"] = {
|
["indent-blankline.nvim"] = {
|
||||||
|
config = { "\27LJ\2\2N\0\0\2\0\3\0\0066\0\0\0'\1\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\tinit&opdavies.plugins.indent-blankline\frequire\0" },
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/indent-blankline.nvim"
|
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/indent-blankline.nvim",
|
||||||
},
|
url = "https://github.com/lukas-reineke/indent-blankline.nvim"
|
||||||
["jellybeans.vim"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/jellybeans.vim"
|
|
||||||
},
|
},
|
||||||
["lspkind-nvim"] = {
|
["lspkind-nvim"] = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/lspkind-nvim"
|
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/lspkind-nvim",
|
||||||
|
url = "https://github.com/onsails/lspkind-nvim"
|
||||||
},
|
},
|
||||||
nerdcommenter = {
|
nerdcommenter = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/nerdcommenter"
|
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/nerdcommenter",
|
||||||
},
|
url = "https://github.com/preservim/nerdcommenter"
|
||||||
["nord-vim"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/nord-vim"
|
|
||||||
},
|
},
|
||||||
["nvim-cmp"] = {
|
["nvim-cmp"] = {
|
||||||
|
config = {},
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/nvim-cmp"
|
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/nvim-cmp",
|
||||||
|
url = "https://github.com/hrsh7th/nvim-cmp"
|
||||||
},
|
},
|
||||||
["nvim-colorizer.lua"] = {
|
["nvim-colorizer.lua"] = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/nvim-colorizer.lua"
|
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/nvim-colorizer.lua",
|
||||||
|
url = "https://github.com/norcalli/nvim-colorizer.lua"
|
||||||
},
|
},
|
||||||
["nvim-lspconfig"] = {
|
["nvim-lspconfig"] = {
|
||||||
|
config = { "\27LJ\2\2G\0\0\2\0\3\0\0066\0\0\0'\1\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\tinit\31opdavies.plugins.lspconfig\frequire\0" },
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/nvim-lspconfig"
|
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/nvim-lspconfig",
|
||||||
|
url = "https://github.com/neovim/nvim-lspconfig"
|
||||||
},
|
},
|
||||||
["nvim-treesitter"] = {
|
["nvim-treesitter"] = {
|
||||||
|
config = { "\27LJ\2\2H\0\0\2\0\3\0\0066\0\0\0'\1\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\tinit opdavies.plugins.treesitter\frequire\0" },
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/nvim-treesitter"
|
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/nvim-treesitter",
|
||||||
|
url = "https://github.com/nvim-treesitter/nvim-treesitter"
|
||||||
},
|
},
|
||||||
["nvim-ts-context-commentstring"] = {
|
["nvim-ts-context-commentstring"] = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/nvim-ts-context-commentstring"
|
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/nvim-ts-context-commentstring",
|
||||||
|
url = "https://github.com/JoosepAlviste/nvim-ts-context-commentstring"
|
||||||
|
},
|
||||||
|
["packer.nvim"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/packer.nvim",
|
||||||
|
url = "https://github.com/wbthomason/packer.nvim"
|
||||||
},
|
},
|
||||||
["plenary.nvim"] = {
|
["plenary.nvim"] = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/plenary.nvim"
|
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/plenary.nvim",
|
||||||
|
url = "https://github.com/nvim-lua/plenary.nvim"
|
||||||
},
|
},
|
||||||
["popup.nvim"] = {
|
["popup.nvim"] = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/popup.nvim"
|
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/popup.nvim",
|
||||||
|
url = "https://github.com/nvim-lua/popup.nvim"
|
||||||
},
|
},
|
||||||
["scss-syntax.vim"] = {
|
["scss-syntax.vim"] = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/scss-syntax.vim"
|
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/scss-syntax.vim",
|
||||||
|
url = "https://github.com/cakebaker/scss-syntax.vim"
|
||||||
},
|
},
|
||||||
["seiya.vim"] = {
|
["seiya.vim"] = {
|
||||||
|
config = { "\27LJ\2\2C\0\0\2\0\3\0\0066\0\0\0'\1\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\tinit\27opdavies.plugins.seiya\frequire\0" },
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/seiya.vim"
|
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/seiya.vim",
|
||||||
|
url = "https://github.com/miyakogi/seiya.vim"
|
||||||
},
|
},
|
||||||
["telescope-fzf-native.nvim"] = {
|
["telescope-fzf-native.nvim"] = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/telescope-fzf-native.nvim"
|
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/telescope-fzf-native.nvim",
|
||||||
|
url = "https://github.com/nvim-telescope/telescope-fzf-native.nvim"
|
||||||
},
|
},
|
||||||
["telescope.nvim"] = {
|
["telescope.nvim"] = {
|
||||||
|
config = { "\27LJ\2\2G\0\0\2\0\3\0\0066\0\0\0'\1\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\tinit\31opdavies.plugins.telescope\frequire\0" },
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/telescope.nvim"
|
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/telescope.nvim",
|
||||||
|
url = "https://github.com/nvim-telescope/telescope.nvim"
|
||||||
},
|
},
|
||||||
["vim-case-change"] = {
|
["vim-case-change"] = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/vim-case-change"
|
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/vim-case-change",
|
||||||
|
url = "https://github.com/icatalina/vim-case-change"
|
||||||
},
|
},
|
||||||
["vim-floaterm"] = {
|
["vim-floaterm"] = {
|
||||||
|
config = { "\27LJ\2\2F\0\0\2\0\3\0\0066\0\0\0'\1\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\tinit\30opdavies.plugins.floaterm\frequire\0" },
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/vim-floaterm"
|
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/vim-floaterm",
|
||||||
|
url = "https://github.com/voldikss/vim-floaterm"
|
||||||
},
|
},
|
||||||
["vim-highlightedyank"] = {
|
["vim-highlightedyank"] = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/vim-highlightedyank"
|
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/vim-highlightedyank",
|
||||||
|
url = "https://github.com/machakann/vim-highlightedyank"
|
||||||
},
|
},
|
||||||
["vim-polyglot"] = {
|
["vim-polyglot"] = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/vim-polyglot"
|
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/vim-polyglot",
|
||||||
|
url = "https://github.com/sheerun/vim-polyglot"
|
||||||
},
|
},
|
||||||
["vim-sort-motion"] = {
|
["vim-sort-motion"] = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/vim-sort-motion"
|
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/vim-sort-motion",
|
||||||
|
url = "https://github.com/christoomey/vim-sort-motion"
|
||||||
},
|
},
|
||||||
["vim-surround"] = {
|
["vim-surround"] = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/vim-surround"
|
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/vim-surround",
|
||||||
|
url = "https://github.com/tpope/vim-surround"
|
||||||
},
|
},
|
||||||
["vim-test"] = {
|
["vim-test"] = {
|
||||||
|
config = { "\27LJ\2\2F\0\0\2\0\3\0\0066\0\0\0'\1\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\tinit\30opdavies.plugins.vim-test\frequire\0" },
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/vim-test"
|
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/vim-test",
|
||||||
|
url = "https://github.com/vim-test/vim-test"
|
||||||
},
|
},
|
||||||
["vim-tmux-navigator"] = {
|
["vim-tmux-navigator"] = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/vim-tmux-navigator"
|
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/vim-tmux-navigator",
|
||||||
|
url = "https://github.com/christoomey/vim-tmux-navigator"
|
||||||
},
|
},
|
||||||
["vim-visual-multi"] = {
|
["vim-visual-multi"] = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/vim-visual-multi"
|
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/vim-visual-multi",
|
||||||
|
url = "https://github.com/mg979/vim-visual-multi"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
time([[Defining packer_plugins]], false)
|
time([[Defining packer_plugins]], false)
|
||||||
|
-- Config for: telescope.nvim
|
||||||
|
time([[Config for telescope.nvim]], true)
|
||||||
|
try_loadstring("\27LJ\2\2G\0\0\2\0\3\0\0066\0\0\0'\1\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\tinit\31opdavies.plugins.telescope\frequire\0", "config", "telescope.nvim")
|
||||||
|
time([[Config for telescope.nvim]], false)
|
||||||
|
-- Config for: vim-floaterm
|
||||||
|
time([[Config for vim-floaterm]], true)
|
||||||
|
try_loadstring("\27LJ\2\2F\0\0\2\0\3\0\0066\0\0\0'\1\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\tinit\30opdavies.plugins.floaterm\frequire\0", "config", "vim-floaterm")
|
||||||
|
time([[Config for vim-floaterm]], false)
|
||||||
|
-- Config for: indent-blankline.nvim
|
||||||
|
time([[Config for indent-blankline.nvim]], true)
|
||||||
|
try_loadstring("\27LJ\2\2N\0\0\2\0\3\0\0066\0\0\0'\1\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\tinit&opdavies.plugins.indent-blankline\frequire\0", "config", "indent-blankline.nvim")
|
||||||
|
time([[Config for indent-blankline.nvim]], false)
|
||||||
|
-- Config for: nvim-treesitter
|
||||||
|
time([[Config for nvim-treesitter]], true)
|
||||||
|
try_loadstring("\27LJ\2\2H\0\0\2\0\3\0\0066\0\0\0'\1\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\tinit opdavies.plugins.treesitter\frequire\0", "config", "nvim-treesitter")
|
||||||
|
time([[Config for nvim-treesitter]], false)
|
||||||
|
-- Config for: gruvbuddy.nvim
|
||||||
|
time([[Config for gruvbuddy.nvim]], true)
|
||||||
|
try_loadstring("\27LJ\2\2E\0\0\2\0\3\0\0066\0\0\0'\1\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\tinit\29opdavies.plugins.colours\frequire\0", "config", "gruvbuddy.nvim")
|
||||||
|
time([[Config for gruvbuddy.nvim]], false)
|
||||||
|
-- Config for: nvim-cmp
|
||||||
|
time([[Config for nvim-cmp]], true)
|
||||||
|
time([[Config for nvim-cmp]], false)
|
||||||
|
-- Config for: gitsigns.nvim
|
||||||
|
time([[Config for gitsigns.nvim]], true)
|
||||||
|
try_loadstring("\27LJ\2\2F\0\0\2\0\3\0\0066\0\0\0'\1\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\tinit\30opdavies.plugins.gitsigns\frequire\0", "config", "gitsigns.nvim")
|
||||||
|
time([[Config for gitsigns.nvim]], false)
|
||||||
|
-- Config for: seiya.vim
|
||||||
|
time([[Config for seiya.vim]], true)
|
||||||
|
try_loadstring("\27LJ\2\2C\0\0\2\0\3\0\0066\0\0\0'\1\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\tinit\27opdavies.plugins.seiya\frequire\0", "config", "seiya.vim")
|
||||||
|
time([[Config for seiya.vim]], false)
|
||||||
|
-- Config for: vim-test
|
||||||
|
time([[Config for vim-test]], true)
|
||||||
|
try_loadstring("\27LJ\2\2F\0\0\2\0\3\0\0066\0\0\0'\1\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\tinit\30opdavies.plugins.vim-test\frequire\0", "config", "vim-test")
|
||||||
|
time([[Config for vim-test]], false)
|
||||||
|
-- Config for: nvim-lspconfig
|
||||||
|
time([[Config for nvim-lspconfig]], true)
|
||||||
|
try_loadstring("\27LJ\2\2G\0\0\2\0\3\0\0066\0\0\0'\1\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\tinit\31opdavies.plugins.lspconfig\frequire\0", "config", "nvim-lspconfig")
|
||||||
|
time([[Config for nvim-lspconfig]], false)
|
||||||
if should_profile then save_profiles() end
|
if should_profile then save_profiles() end
|
||||||
|
|
||||||
end)
|
end)
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
" Clears hlsearch after doing a search, otherwise just does normal <CR> stuff
|
|
||||||
|
|
||||||
nnoremap <silent> <C-f> :silent !tmux neww tmux-sessioniser<CR>
|
|
|
@ -1,2 +0,0 @@
|
||||||
let g:nord_bold_vertical_split_line = 1
|
|
||||||
let g:nord_cursor_line_number_background = 1
|
|
|
@ -1,4 +0,0 @@
|
||||||
let g:seiya_auto_enable=1
|
|
||||||
|
|
||||||
" Neovim compatibility.
|
|
||||||
let g:seiya_target_groups = has('nvim') ? ['guibg'] : ['ctermbg']
|
|
|
@ -1,11 +0,0 @@
|
||||||
" Builtin
|
|
||||||
nnoremap <leader>fb <CMD>lua require("telescope.builtin").buffers()<CR>
|
|
||||||
nnoremap <leader>fc <CMD>lua require("telescope.builtin").lsp_code_actions()<CR>
|
|
||||||
nnoremap <leader>fd <CMD>lua require("telescope.builtin").lsp_workspace_diagnostics()<CR>
|
|
||||||
nnoremap <leader>fe <CMD>lua require("telescope.builtin").file_browser{ cwd = vim.fn.expand("%:p:h") }<CR>
|
|
||||||
nnoremap <leader>ff <CMD>lua require("telescope.builtin").find_files{ hidden = true }<CR>
|
|
||||||
nnoremap <leader>fg <CMD>lua require("telescope.builtin").git_files{}<CR>
|
|
||||||
nnoremap <leader>fh <CMD>lua require("telescope.builtin").help_tags()<CR>
|
|
||||||
nnoremap <leader>fl <CMD>lua require("telescope.builtin").live_grep()<CR>
|
|
||||||
nnoremap <leader>fr <CMD>lua require("telescope.builtin").registers()<CR>
|
|
||||||
nnoremap <leader>fr <CMD>lua require("telescope.builtin").registers()<CR>
|
|
|
@ -1,7 +0,0 @@
|
||||||
nmap <silent> t<C-f> :TestFile<CR>
|
|
||||||
nmap <silent> t<C-g> :TestVisit<CR>
|
|
||||||
nmap <silent> t<C-l> :TestLast<CR>
|
|
||||||
nmap <silent> t<C-n> :TestNearest<CR>
|
|
||||||
nmap <silent> t<C-s> :TestSuite<CR>
|
|
||||||
|
|
||||||
let test#strategy = "neovim"
|
|
Loading…
Reference in a new issue