chore(nvim): ensure that plugins are installed

This commit is contained in:
Oliver Davies 2021-12-23 23:13:45 +00:00
parent c4e0a44495
commit 59055b0a2f
9 changed files with 74 additions and 20 deletions

View file

@ -1,3 +1,13 @@
require("colorbuddy").colorscheme("gruvbuddy")
local colorbuddy_status_ok, colorbuddy = pcall(require, "colorbuddy")
if not colorbuddy_status_ok then
return
end
require'colorizer'.setup()
local colorizer_status_ok, colorizer = pcall(require, "colorizer")
if not colorizer_status_ok then
return
end
colorbuddy.colorscheme("gruvbuddy")
colorizer.setup()

View file

@ -1,4 +1,9 @@
require 'Comment'.setup {
local status_ok, comment = pcall(require, "Comment")
if not status_ok then
return
end
comment.setup {
padding = true,
opleader = {

View file

@ -1,4 +1,14 @@
local cmp = require "cmp"
local cmp_status_ok, cmp = pcall(require, "cmp")
if not cmp_status_ok then
return
end
local snip_status_ok, luasnip = pcall(require, "luasnip")
if not snip_status_ok then
return
end
require("luasnip/loaders/from_vscode").lazy_load()
cmp.setup {
snippet = {

View file

@ -1,4 +1,12 @@
require "colorbuddy"
local colorbuddy_status_ok, colorbuddy = pcall(require, "colorbuddy")
if not colorbuddy_status_ok then
return
end
local gitsigns_status_ok, gitsigns = pcall(require, "gitsigns")
if not gitsigns_status_ok then
return
end
local c = require("colorbuddy.color").colors
local Group = require("colorbuddy.group").Group
@ -7,7 +15,7 @@ Group.new("GitSignsAdd", c.green)
Group.new("GitSignsChange", c.yellow)
Group.new("GitSignsDelete", c.red)
require 'gitsigns'.setup {
gitsigns.setup {
linehl = false,
numhl = true,

View file

@ -1,3 +1,8 @@
local status_ok, indent_blankline = pcall(require, "indent_blankline")
if not status_ok then
return
end
vim.opt.list = true
vim.opt.listchars = {
eol = "",
@ -5,7 +10,7 @@ vim.opt.listchars = {
vim.cmd [[highlight IndentBlanklineIndent1 guifg=#555555 gui=nocombine]]
require "indent_blankline".setup {
indent_blankline.setup {
char_highlight_list = {
"IndentBlanklineIndent1",
},

View file

@ -1,4 +1,7 @@
--local has_lsp, lspconfig = pcall(require, "lspconfig")
local status_ok, lspconfig = pcall(require, "lspconfig")
if not status_ok then
return
end
local function config(_config)
return vim.tbl_deep_extend("force", {
@ -6,23 +9,23 @@ local function config(_config)
}, _config or {})
end
require'lspconfig'.ansiblels.setup(config())
lspconfig.ansiblels.setup(config())
require'lspconfig'.bashls.setup(config())
lspconfig.bashls.setup(config())
require'lspconfig'.cssls.setup(config())
lspconfig.cssls.setup(config())
require'lspconfig'.html.setup(config())
lspconfig.html.setup(config())
require'lspconfig'.intelephense.setup(config({
lspconfig.intelephense.setup(config({
filetypes = { "php", "test", "theme" }
}))
require'lspconfig'.tsserver.setup(config())
lspconfig.tsserver.setup(config())
require'lspconfig'.vuels.setup(config())
lspconfig.vuels.setup(config())
require'lspconfig'.yamlls.setup(config())
lspconfig.yamlls.setup(config())
vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(
vim.lsp.diagnostic.on_publish_diagnostics, {

View file

@ -1,3 +1,8 @@
local status_ok, telescope = pcall(require, "telescope")
if not status_ok then
return
end
local previewers = require('telescope.previewers')
local Job = require('plenary.job')
@ -21,15 +26,15 @@ local new_maker = function(filepath, bufnr, opts)
}):sync()
end
require "telescope".setup{
telescope.setup{
defaults = {
buffer_previewer_maker = new_maker,
prompt_prefix = "$ "
}
}
require "telescope".load_extension("fzf")
telescope.load_extension("fzf")
local map = vim.api.nvim_set_keymap
local options = {

View file

@ -1,4 +1,9 @@
require "nvim-treesitter.configs".setup {
local status_ok, configs = pcall(require, "nvim-treesitter.configs")
if not status_ok then
return
end
configs.setup {
context_commenting = {
enable = true
},

View file

@ -1,4 +1,7 @@
local packer = require('packer')
local status_ok, packer = pcall(require, "packer")
if not status_ok then
return
end
packer.init {
display = {