Fix formatting | Handle a edgecase in telescope config | Misc
* fix formatting in pluginList, luasnip * don't use pcall on highlights * sync and compile fzf and media files only when the error occurs, add a help text telling tbe user to restart neovim
This commit is contained in:
parent
05d57bba29
commit
0023233eef
@ -19,7 +19,7 @@ opt.clipboard = "unnamedplus"
|
||||
opt.shortmess:append("sI")
|
||||
|
||||
-- disable tilde on end of buffer: https://github.com/ neovim/neovim/pull/8546#issuecomment-643643758
|
||||
vim.cmd [[let &fcs='eob: ']]
|
||||
vim.cmd("let &fcs='eob: '")
|
||||
|
||||
-- Numbers
|
||||
opt.number = true
|
||||
|
@ -1,4 +1,5 @@
|
||||
local present, _ = pcall(require, "packerInit")
|
||||
local packer
|
||||
|
||||
if present then
|
||||
packer = require "packer"
|
||||
@ -10,9 +11,15 @@ local use = packer.use
|
||||
|
||||
return packer.startup(
|
||||
function()
|
||||
use {"wbthomason/packer.nvim", event = "VimEnter"}
|
||||
use {
|
||||
"wbthomason/packer.nvim",
|
||||
event = "VimEnter"
|
||||
}
|
||||
|
||||
use {"akinsho/nvim-bufferline.lua", after = "nvim-base16.lua"}
|
||||
use {
|
||||
"akinsho/nvim-bufferline.lua",
|
||||
after = "nvim-base16.lua"
|
||||
}
|
||||
|
||||
use {
|
||||
"glepnir/galaxyline.nvim",
|
||||
@ -76,7 +83,7 @@ return packer.startup(
|
||||
config = function()
|
||||
require "plugins.compe"
|
||||
end,
|
||||
wants = {"LuaSnip"},
|
||||
wants = "LuaSnip",
|
||||
requires = {
|
||||
{
|
||||
"L3MON4D3/LuaSnip",
|
||||
@ -93,7 +100,10 @@ return packer.startup(
|
||||
}
|
||||
}
|
||||
|
||||
use {"sbdchd/neoformat", cmd = "Neoformat"}
|
||||
use {
|
||||
"sbdchd/neoformat",
|
||||
cmd = "Neoformat"
|
||||
}
|
||||
|
||||
-- file managing , picker etc
|
||||
use {
|
||||
@ -112,8 +122,14 @@ return packer.startup(
|
||||
end
|
||||
}
|
||||
|
||||
use {"nvim-lua/plenary.nvim", event = "BufRead"}
|
||||
use {"nvim-lua/popup.nvim", after = "plenary.nvim"}
|
||||
use {
|
||||
"nvim-lua/plenary.nvim",
|
||||
event = "BufRead"
|
||||
}
|
||||
use {
|
||||
"nvim-lua/popup.nvim",
|
||||
after = "plenary.nvim"
|
||||
}
|
||||
|
||||
use {
|
||||
"nvim-telescope/telescope.nvim",
|
||||
@ -123,7 +139,11 @@ return packer.startup(
|
||||
end
|
||||
}
|
||||
|
||||
use {"nvim-telescope/telescope-fzf-native.nvim", run = "make", cmd = "Telescope"}
|
||||
use {
|
||||
"nvim-telescope/telescope-fzf-native.nvim",
|
||||
run = "make",
|
||||
cmd = "Telescope"
|
||||
}
|
||||
use {
|
||||
"nvim-telescope/telescope-media-files.nvim",
|
||||
cmd = "Telescope"
|
||||
@ -147,7 +167,10 @@ return packer.startup(
|
||||
end
|
||||
}
|
||||
|
||||
use {"andymass/vim-matchup", event = "CursorMoved"}
|
||||
use {
|
||||
"andymass/vim-matchup",
|
||||
event = "CursorMoved"
|
||||
}
|
||||
|
||||
use {
|
||||
"terrortylor/nvim-comment",
|
||||
@ -171,7 +194,10 @@ return packer.startup(
|
||||
end
|
||||
}
|
||||
|
||||
use {"tweekmonster/startuptime.vim", cmd = "StartupTime"}
|
||||
use {
|
||||
"tweekmonster/startuptime.vim",
|
||||
cmd = "StartupTime"
|
||||
}
|
||||
|
||||
-- load autosave only if its globally enabled
|
||||
use {
|
||||
@ -195,7 +221,11 @@ return packer.startup(
|
||||
|
||||
use {
|
||||
"Pocco81/TrueZen.nvim",
|
||||
cmd = {"TZAtaraxis", "TZMinimalist", "TZFocus"},
|
||||
cmd = {
|
||||
"TZAtaraxis",
|
||||
"TZMinimalist",
|
||||
"TZFocus"
|
||||
},
|
||||
config = function()
|
||||
require "plugins.zenmode"
|
||||
end
|
||||
|
@ -1,11 +1,5 @@
|
||||
local luasnip
|
||||
if
|
||||
not pcall(
|
||||
function()
|
||||
luasnip = require "luasnip"
|
||||
end
|
||||
)
|
||||
then
|
||||
local present, luasnip = pcall(require, "luasnip")
|
||||
if not present then
|
||||
return
|
||||
end
|
||||
|
||||
|
@ -76,5 +76,8 @@ if
|
||||
)
|
||||
then
|
||||
-- This should only trigger when in need of PackerSync, so better do it
|
||||
vim.cmd("PackerSync")
|
||||
print("After completion of PackerSync, restart neovim.")
|
||||
require("packer").sync("telescope-fzf-native.nvim", "telescope-media-files.nvim")
|
||||
-- why compile too ? well, packer is supposed to compile with sync only, but sometimes it doesn't work
|
||||
vim.cmd("PackerCompile")
|
||||
end
|
||||
|
@ -4,7 +4,7 @@ local present, base16 = pcall(require, "base16")
|
||||
|
||||
if present then
|
||||
base16(base16.themes["onedark"], true)
|
||||
pcall(require, "highlights")
|
||||
require "highlights"
|
||||
return true
|
||||
else
|
||||
return false
|
||||
|
Loading…
Reference in New Issue
Block a user