90 lines
3.4 KiB
Lua
90 lines
3.4 KiB
Lua
-- ============================================================
|
|
-- SECTION 9: OPTIONAL EXAMPLES / NEXT STEPS
|
|
-- kickstart.plugins.* examples
|
|
-- ============================================================
|
|
do
|
|
-- IMPORTANT: on first install do the following:
|
|
-- cd ~/.local/share/nvim/site/pack/core/opt/markdown-preview.nvim/app
|
|
-- yarn install
|
|
vim.pack.add { gh 'iamcco/markdown-preview.nvim' }
|
|
vim.g.mkdp_open_to_world = 0
|
|
vim.g.mkdp_open_ip = ''
|
|
vim.g.mkdp_auto_start = 0
|
|
vim.g.mkdp_auto_close = 1
|
|
vim.g.mkdp_refresh_slow = 0
|
|
vim.g.mkdp_port = '8080'
|
|
vim.g.mkdp_filetypes = { 'markdown' }
|
|
vim.g.mkdp_auto_open = 1
|
|
vim.g.mkdp_theme = 'dark'
|
|
vim.g.mkdp_enable_mathjax = 1
|
|
|
|
vim.pack.add { gh 'neogitorg/neogit', gh 'sindrets/diffview.nvim', gh 'm00qek/baleia.nvim' }
|
|
safe_require('neogit', false, function(_)
|
|
vim.keymap.set('n', '<leader>gg', vim.cmd.Neogit, { desc = 'Open Neogit' })
|
|
vim.keymap.set('n', '<leader>gd', ':DiffviewOpen')
|
|
vim.keymap.set('n', '<leader>gc', vim.cmd.DiffviewClose)
|
|
end)
|
|
|
|
vim.pack.add { gh 'windwp/nvim-autopairs' }
|
|
safe_require 'nvim-autopairs'
|
|
|
|
vim.pack.add { gh 'lukas-reineke/indent-blankline.nvim' }
|
|
safe_require 'ibl'
|
|
|
|
vim.pack.add { gh 'stevearc/oil.nvim' }
|
|
safe_require('oil', {
|
|
view_options = {
|
|
show_hidden = true,
|
|
},
|
|
}, function(oil)
|
|
vim.keymap.set('n', '<leader>ex', function() oil.open() end, { desc = 'Open parent directory of current file' })
|
|
vim.keymap.set('n', '<leader>ep', function() oil.open(vim.fn.getcwd()) end, { desc = 'Open oil in project root (CWD)' })
|
|
end)
|
|
|
|
-- vim.pack.add { gh 'm4xshen/autoclose.nvim' }
|
|
-- safe_require 'autoclose'
|
|
|
|
-- require('markdown-preview.nvim').setup {}
|
|
--
|
|
-- -- build = "cd app && npm install",
|
|
-- --
|
|
-- -- -- Lazy-load the plugin on specific commands or filetypes for speed.
|
|
-- -- cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" },
|
|
-- -- ft = { "markdown" },
|
|
-- -- Tell the plugin to activate for markdown files.
|
|
-- vim.g.mkdp_filetypes = { 'markdown' }
|
|
--
|
|
-- -- Automatically open the preview in the browser.
|
|
-- vim.g.mkdp_auto_open = 1
|
|
--
|
|
-- -- Use a dark theme for the preview.
|
|
-- vim.g.mkdp_theme = 'dark'
|
|
--
|
|
-- -- CRITICAL: This enables LaTeX rendering via MathJax.
|
|
-- vim.g.mkdp_enable_mathjax = 1
|
|
|
|
-- The following comments only work if you have downloaded the kickstart repo, not just copy pasted the
|
|
-- init.lua. If you want these files, they are in the repository, so you can just download them and
|
|
-- place them in the correct locations.
|
|
|
|
-- NOTE: Next step on your Neovim journey: Add/Configure additional plugins for Kickstart
|
|
--
|
|
-- Here are some example plugins that I've included in the Kickstart repository.
|
|
-- Uncomment any of the lines below to enable them (you will need to restart nvim).
|
|
--
|
|
-- require 'kickstart.plugins.debug'
|
|
-- require 'kickstart.plugins.indent_line'
|
|
-- require 'kickstart.plugins.lint'
|
|
-- require 'kickstart.plugins.autopairs'
|
|
-- require 'kickstart.plugins.neo-tree'
|
|
-- require 'kickstart.plugins.gitsigns' -- adds gitsigns recommended keymaps
|
|
|
|
-- NOTE: You can add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
|
|
--
|
|
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
|
|
-- require 'custom.plugins'
|
|
end
|
|
|
|
-- The line beneath this is called `modeline`. See `:help modeline`
|
|
-- vim: ts=2 sts=2 sw=2 et
|