Skip to content

Commit

Permalink
feat(nvim): markdown-oxide config
Browse files Browse the repository at this point in the history
  • Loading branch information
jiangyinzuo committed Apr 14, 2024
1 parent 44d83ac commit 68364a0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
9 changes: 8 additions & 1 deletion root/.config/nvim/lua/lsp/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -117,15 +117,22 @@ local function setup_lsp(on_attach, capabilities)
}
}

-- marksman and markdown_oxide are both markdown language servers, choose one of them
lspconfig.marksman.setup {
autostart = vim.fn.get(vim.g.nvim_lsp_autostart, 'marksman', false),
on_attach = on_attach,
capabilities = capabilities,
}
lspconfig.markdown_oxide.setup {
autostart = vim.fn.get(vim.g.nvim_lsp_autostart, 'markdown_oxide', false),
on_attach = on_attach,
capabilities = capabilities,
root_dir = lspconfig.util.root_pattern('.moxide.toml', '.git'),
}

-- https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#jsonls
-- npm i -g vscode-langservers-extracted
local other_servers = { 'jsonls', 'pyright', 'typst_lsp', 'marksman' }
local other_servers = { 'jsonls', 'pyright', 'typst_lsp' }
for _, lsp in ipairs(other_servers) do
lspconfig[lsp].setup {
on_attach = on_attach,
Expand Down
4 changes: 2 additions & 2 deletions root/fzf/fzf.bash
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ rfv() {
--header 'CTRL-T: Switch between ripgrep/fzf' \
--preview 'batcat --color=always {1} --highlight-line {2}' \
--preview-window 'up,60%,border-bottom,+{2}+3/3,~3' \
--bind 'enter:become(vim {1} +{2})'
--bind "enter:become(${EDITOR:-vim} {1} +{2})"
}

rffv() {
Expand All @@ -103,7 +103,7 @@ rffv() {
--preview 'batcat --color=always {1} --highlight-line {2}' \
--preview-window 'up,60%,border-bottom,+{2}+3/3,~3'
)
[ -n "${selected[0]}" ] && vim "${selected[0]}" "+${selected[1]}"
[ -n "${selected[0]}" ] && ${EDITOR:-vim} "${selected[0]}" "+${selected[1]}"
}

# https://github.com/ColonelBuendia/rgpipe
Expand Down

0 comments on commit 68364a0

Please sign in to comment.