-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathinit.lua
100 lines (100 loc) · 2.97 KB
/
init.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
return {
{
"bluz71/vim-nightfly-guicolors",
lazy = false,
priority = 1000,
},
{
"dstein64/vim-startuptime",
cmd = "StartupTime",
},
-- SmartYank (by me)
{
"ibhagwan/smartyank.nvim",
config = function()
require("smartyank").setup({ highlight = { timeout = 1000 } })
end,
event = "VeryLazy",
dev = require("utils").is_dev("smartyank.nvim")
},
-- plenary is required by gitsigns and telescope
{
"nvim-lua/plenary.nvim",
keys = { "<leader>tt", "<leader>td" },
config = function()
vim.keymap.set({ "n", "v" }, "<leader>tt",
function() require("plenary.test_harness").test_file(vim.fn.expand("%")) end,
{ silent = true, desc = "Run tests in current file" })
vim.keymap.set({ "n", "v" }, "<leader>td",
function() require("plenary.test_harness").test_directory_command("tests") end,
{ silent = true, desc = "Run tests in 'tests' directory" })
end,
},
{
"previm/previm",
commit = "0a3eaad218bc58af867c1a7a71b1d8323a5a7039",
config = function()
-- vim.g.previm_open_cmd = 'firefox';
vim.g.previm_open_cmd = "/shared/$USER/Applications/chromium/chrome";
vim.g.previm_enable_realtime = 0
vim.g.previm_code_language_show = 1
vim.g.previm_disable_default_css = 1
vim.g.previm_custom_css_path = vim.fn.stdpath("config") .. "/css/previm-gh-dark.css"
local hljs_ghdark_css = "highlight-gh-dark.css"
vim.g.previm_extra_libraries = { {
name = "highlight-gh-dark",
files = { {
type = "css",
-- must use previm jailed path due to chrome running in firejail
path = "_/css/lib/highlight-gh-dark.css",
} },
} }
-- Copy our custom code highlight css to the jailbreak folder
if not uv.fs_copyfile(vim.fn.stdpath("config") .. "/css/" .. hljs_ghdark_css,
vim.fn.stdpath("data") .. "/lazy/previm/preview/_/css/lib/" .. hljs_ghdark_css) then
require("utils").warn(string.format(
"Unable to copy '%s' to previm jail.", hljs_ghdark_css))
end
-- clear cache every time we open neovim
vim.fn["previm#wipe_cache"]()
end,
ft = { "markdown" },
},
{
"junegunn/fzf.vim",
enabled = true,
lazy = false,
dev = true,
-- windows doesn't have fzf runtime plugin
dependencies = require("utils")._if_win({ "junegunn/fzf" }, nil),
},
{
"pwntester/octo.nvim",
enabled = false,
lazy = false,
dev = true,
config = function()
require "octo".setup({ picker = "fzf-lua" })
end
},
{
"MeanderingProgrammer/render-markdown.nvim",
enabled = true,
ft = "markdown",
config = function()
require("render-markdown").setup({
file_types = { "markdown" },
code = {
sign = false,
width = "block",
right_pad = 4,
position = "right",
},
heading = {
sign = false,
-- icons = {},
},
})
end,
}
}