added a whole bunch of plugins and a custom Zola snippet :D
This commit is contained in:
parent
47696240f3
commit
b42073a951
17
init.lua
17
init.lua
|
@ -392,6 +392,8 @@ require('lazy').setup({
|
|||
vim.keymap.set('n', '<leader>s.', builtin.oldfiles, { desc = '[S]earch Recent Files ("." for repeat)' })
|
||||
vim.keymap.set('n', '<leader><leader>', builtin.buffers, { desc = '[ ] Find existing buffers' })
|
||||
|
||||
vim.keymap.set('n', '<leader>sl', ':Telescope luasnip<CR>', { desc = '[S]earch [L]uasnip' })
|
||||
|
||||
-- Slightly advanced example of overriding default behavior and theme
|
||||
vim.keymap.set('n', '<leader>/', function()
|
||||
-- You can pass additional configuration to Telescope to change the theme, layout, etc.
|
||||
|
@ -697,16 +699,19 @@ require('lazy').setup({
|
|||
end
|
||||
return 'make install_jsregexp'
|
||||
end)(),
|
||||
config = function()
|
||||
require 'snippets'
|
||||
end,
|
||||
dependencies = {
|
||||
-- `friendly-snippets` contains a variety of premade snippets.
|
||||
-- See the README about individual language/framework/plugin snippets:
|
||||
-- https://github.com/rafamadriz/friendly-snippets
|
||||
-- {
|
||||
-- 'rafamadriz/friendly-snippets',
|
||||
-- config = function()
|
||||
-- require('luasnip.loaders.from_vscode').lazy_load()
|
||||
-- end,
|
||||
-- },
|
||||
{
|
||||
'rafamadriz/friendly-snippets',
|
||||
config = function()
|
||||
require('luasnip.loaders.from_vscode').lazy_load()
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
'saadparwaiz1/cmp_luasnip',
|
||||
|
|
8
lua/custom/plugins/markdown-preview.lua
Normal file
8
lua/custom/plugins/markdown-preview.lua
Normal file
|
@ -0,0 +1,8 @@
|
|||
return {
|
||||
'iamcco/markdown-preview.nvim',
|
||||
cmd = { 'MarkdownPreviewToggle', 'MarkdownPreview', 'MarkdownPreviewStop' },
|
||||
ft = { 'markdown' },
|
||||
build = function()
|
||||
vim.fn['mkdp#util#install']()
|
||||
end,
|
||||
}
|
5
lua/custom/plugins/markdown.lua
Normal file
5
lua/custom/plugins/markdown.lua
Normal file
|
@ -0,0 +1,5 @@
|
|||
return {
|
||||
'MeanderingProgrammer/render-markdown.nvim',
|
||||
opts = {},
|
||||
dependencies = { 'nvim-treesitter/nvim-treesitter' },
|
||||
}
|
7
lua/custom/plugins/mini-align.lua
Normal file
7
lua/custom/plugins/mini-align.lua
Normal file
|
@ -0,0 +1,7 @@
|
|||
return {
|
||||
'echasnovski/mini.align',
|
||||
version = false,
|
||||
config = function()
|
||||
require('mini.align').setup()
|
||||
end,
|
||||
}
|
|
@ -11,7 +11,7 @@ return {
|
|||
-- OPTIONAL:
|
||||
-- `nvim-notify` is only needed, if you want to use the notification view.
|
||||
-- If not available, we use `mini` as the fallback
|
||||
'rcarriga/nvim-notify',
|
||||
-- 'rcarriga/nvim-notify',
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ return {
|
|||
group_empty = true,
|
||||
},
|
||||
filters = {
|
||||
dotfiles = true,
|
||||
dotfiles = false,
|
||||
},
|
||||
}
|
||||
end,
|
||||
|
|
10
lua/custom/plugins/surround.lua
Normal file
10
lua/custom/plugins/surround.lua
Normal file
|
@ -0,0 +1,10 @@
|
|||
return {
|
||||
'kylechui/nvim-surround',
|
||||
version = '*', -- Use for stability; omit to use `main` branch for the latest features
|
||||
event = 'VeryLazy',
|
||||
config = function()
|
||||
require('nvim-surround').setup {
|
||||
-- Configuration here, or leave empty to use defaults
|
||||
}
|
||||
end,
|
||||
}
|
3
lua/custom/plugins/telescope-luasnip.lua
Normal file
3
lua/custom/plugins/telescope-luasnip.lua
Normal file
|
@ -0,0 +1,3 @@
|
|||
return {
|
||||
'benfowler/telescope-luasnip.nvim',
|
||||
}
|
|
@ -1,9 +1,7 @@
|
|||
return {
|
||||
{ -- Add indentation guides even on blank lines
|
||||
'lukas-reineke/indent-blankline.nvim',
|
||||
-- Enable `lukas-reineke/indent-blankline.nvim`
|
||||
-- See `:help ibl`
|
||||
main = 'ibl',
|
||||
opts = {},
|
||||
},
|
||||
{
|
||||
'lukas-reineke/indent-blankline.nvim',
|
||||
main = 'ibl',
|
||||
opts = {},
|
||||
},
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ return {
|
|||
config = function()
|
||||
local lint = require 'lint'
|
||||
lint.linters_by_ft = {
|
||||
markdown = { 'markdownlint' },
|
||||
-- markdown = { 'markdownlint' },
|
||||
}
|
||||
|
||||
-- To allow other plugins to add linters to require('lint').linters_by_ft,
|
||||
|
|
37
lua/snippets.lua
Normal file
37
lua/snippets.lua
Normal file
|
@ -0,0 +1,37 @@
|
|||
local ls = require 'luasnip'
|
||||
-- some shorthands...
|
||||
local snip = ls.snippet
|
||||
local node = ls.snippet_node
|
||||
local text = ls.text_node
|
||||
local insert = ls.insert_node
|
||||
local func = ls.function_node
|
||||
local choice = ls.choice_node
|
||||
local dynamicn = ls.dynamic_node
|
||||
|
||||
local date = function()
|
||||
return { os.date '%Y-%m-%d' }
|
||||
end
|
||||
|
||||
ls.add_snippets(nil, {
|
||||
markdown = {
|
||||
snip({
|
||||
trig = 'blogpost',
|
||||
namr = 'Zola blogpost Frontmatter',
|
||||
dscr = 'Frontmatter metadata for Zola markdown blogpost',
|
||||
}, {
|
||||
text { '---', 'title = ' },
|
||||
insert(1, 'note_title'),
|
||||
text { '', 'author = Joost Agterhoek' },
|
||||
text { '', 'date = ' },
|
||||
func(date, {}),
|
||||
text { '', 'updated = ' },
|
||||
func(date, {}),
|
||||
text { '', '[taxonomies]' },
|
||||
text { '', "tags = ['" },
|
||||
insert(2, ''),
|
||||
text { "']" },
|
||||
text { '', '---', '', '' },
|
||||
insert(0),
|
||||
}),
|
||||
},
|
||||
})
|
Loading…
Reference in New Issue
Block a user