Compare commits

...

3 Commits

Author SHA1 Message Date
juan
4c12a2bee9
Fix | Update telescope integration for zk 2022-08-07 15:43:53 +08:00
juan
5e51f8ed36
Feat | Add zk-nvim, remove glow.nvim 2022-08-07 15:04:57 +08:00
juan
5977609f47
Chore | Change commenter plugin 2022-07-12 14:03:08 +08:00
5 changed files with 37 additions and 34 deletions

View File

@ -1,5 +1,4 @@
-- CORE SETTINGS -- CORE SETTINGS
local opt = vim.o local opt = vim.o
local global = vim.g local global = vim.g

View File

@ -41,8 +41,6 @@ vim.api.nvim_set_keymap('', '<leader>tt', ':TagbarToggle<cr>', {silent = true})
vim.api.nvim_set_keymap('', '<C-n>', ':NvimTreeToggle<cr>', {silent = true}) vim.api.nvim_set_keymap('', '<C-n>', ':NvimTreeToggle<cr>', {silent = true})
-- toggle formatter -- toggle formatter
vim.api.nvim_set_keymap('', '<leader>fm', ':Neoformat<cr>', {silent = true}) vim.api.nvim_set_keymap('', '<leader>fm', ':Neoformat<cr>', {silent = true})
-- toggle comment
vim.api.nvim_set_keymap('', '<leader>/', ':CommentToggle<cr>', {silent = true})
-- toggle Hop -- toggle Hop
vim.api.nvim_set_keymap('', '<leader>b', ':HopWordBC<cr>', {silent = true}) vim.api.nvim_set_keymap('', '<leader>b', ':HopWordBC<cr>', {silent = true})
vim.api.nvim_set_keymap('', '<leader>w', ':HopWordAC<cr>', {silent = true}) vim.api.nvim_set_keymap('', '<leader>w', ':HopWordAC<cr>', {silent = true})

View File

@ -62,7 +62,7 @@ return require('packer').startup(function(use)
use { use {
'ms-jpq/coq_nvim', 'ms-jpq/coq_nvim',
branch = 'coq', branch = 'coq',
after = 'nvim-lsp-installer', after = {'nvim-lsp-installer', 'zk-nvim'},
run = ':COQdeps', run = ':COQdeps',
config = function() require "plugins.coq" end config = function() require "plugins.coq" end
} }
@ -79,6 +79,7 @@ return require('packer').startup(function(use)
end end
} }
-- formating and editing -- formating and editing
use {"sbdchd/neoformat", cmd = "Neoformat"} use {"sbdchd/neoformat", cmd = "Neoformat"}
use { use {
@ -89,9 +90,8 @@ return require('packer').startup(function(use)
use {"machakann/vim-sandwich", event = "BufEnter"} use {"machakann/vim-sandwich", event = "BufEnter"}
use { use {
"terrortylor/nvim-comment", 'numToStr/Comment.nvim',
config = function() require('nvim_comment').setup() end, config = function() require('Comment').setup() end
cmd = "CommentToggle"
} }
use { use {
"windwp/nvim-autopairs", "windwp/nvim-autopairs",
@ -111,7 +111,6 @@ return require('packer').startup(function(use)
after = 'nvim-treesitter', after = 'nvim-treesitter',
config = function() require "plugins.matchup" end config = function() require "plugins.matchup" end
} }
-- Lua
use { use {
'abecodes/tabout.nvim', 'abecodes/tabout.nvim',
config = function() require('tabout').setup {} end, config = function() require('tabout').setup {} end,
@ -121,7 +120,7 @@ return require('packer').startup(function(use)
'nvim-telescope/telescope.nvim', 'nvim-telescope/telescope.nvim',
requires = {{'nvim-lua/plenary.nvim'}}, requires = {{'nvim-lua/plenary.nvim'}},
config = function() require "plugins.telescope" end, config = function() require "plugins.telescope" end,
cmd = 'Telescope' event = "UIEnter"
} }
use {'preservim/tagbar', cmd = 'TagbarToggle'} use {'preservim/tagbar', cmd = 'TagbarToggle'}
use { use {
@ -184,7 +183,14 @@ return require('packer').startup(function(use)
-- integrations -- integrations
use {"tpope/vim-fugitive", cmd = "G"} use {"tpope/vim-fugitive", cmd = "G"}
use {"ellisonleao/glow.nvim", branch = 'main', cmd = {"Glow", "GlowInstall"}} use {
"mickael-menu/zk-nvim",
filetypes = {'markdown'},
config = function()
require "plugins.telescope"
require "plugins.zk"
end
}
-- fixes and misc. stuff -- fixes and misc. stuff
use {"antoinemadec/FixCursorHold.nvim"} use {"antoinemadec/FixCursorHold.nvim"}

View File

@ -1,27 +1,6 @@
require('telescope').setup { require('telescope').setup {
defaults = { defaults = {layout_strategy = 'vertical', layout_config = {height = 0.95}},
-- Default configuration for telescope goes here: pickers = {},
-- config_key = value, extensions = {}
-- ..
layout_strategy = 'vertical',
layout_config = {height = 0.95}
},
pickers = {
-- Default configuration for builtin pickers goes here:
-- picker_name = {
-- picker_config_key = value,
-- ...
-- }
-- Now the picker_config_key will be applied every time you call this
-- builtin picker
},
extensions = {
-- Your extension configuration goes here:
-- extension_name = {
-- extension_config_key = value,
-- }
-- please take a look at the readme of the extension you want to configure
}
} }

21
lua/plugins/zk.lua Normal file
View File

@ -0,0 +1,21 @@
require("zk").setup({
-- can be "telescope", "fzf" or "select" (`vim.ui.select`)
-- it's recommended to use "telescope" or "fzf"
picker = "telescope",
lsp = {
-- `config` is passed to `vim.lsp.start_client(config)`
config = {
cmd = { "zk", "lsp" },
name = "zk",
-- on_attach = ...
-- etc, see `:h vim.lsp.start_client()`
},
-- automatically attach buffers in a zk notebook that match the given filetypes
auto_attach = {
enabled = true,
filetypes = { "markdown" },
},
},
})