feat: add markdown preview

This commit is contained in:
DashieTM 2023-01-01 01:42:07 +01:00
parent 7dba0b18be
commit 6f9ecd5c96
5 changed files with 41 additions and 5 deletions

31
nvim/keymap.md Normal file
View file

@ -0,0 +1,31 @@
# List of keymaps
## Space as leader
## Debugging
- F5: toggle breakpoint
- F6: step over breakpoint
- F7: step into breakpoint
- F8: start debugging
- F9: continue from breakpoint
- F10: close debug UI
## Nerd Tree
- t: toggle open
- f: focus tree
## buffer switching
- F1: next buffer (cycles)
- F2: previous buffer (cycles)
## formatting
- F4: format this file
## telescope
- ff: find files
- fg: live ripgrep
- fb: find buffers
- fh: help for functions etc
## toggletrouble
- Ctrl + f: show errors and warnings

View file

@ -1,7 +1,6 @@
local opts = { noremap = true, silent = true }
local term_opts = { silent = true }
local keymap = vim.api.nvim_set_keymap
local builtin = require("telescope.builtin")
-- space leader
vim.g.mapleader = " "
@ -27,10 +26,10 @@ keymap("n", "<F2>", ":BufferNext<CR>", opts)
keymap("n", "<F4>", ":lua vim.lsp.buf.format { async = true }<CR>", opts)
-- telescope
keymap("n", "ff", ":lua builtin.find_files", {})
keymap("n", "fg", ":lua builtin.live_grep", {})
keymap("n", "fb", ":lua builtin.buffers", {})
keymap("n", "fh", ":lua builtin.help_tags", {})
keymap("n", "ff", ':lua require("telescope.builtin").find_files()<CR>', {})
keymap("n", "fg", ':lua require("telescope.builtin").live_grep()<CR>', {})
keymap("n", "fb", ':lua require("telescope.builtin").buffers()<CR>', {})
keymap("n", "fh", ':lua require("telescope.builtin").help_tags()<CR>', {})
-- trouble
keymap("n", "<C-f>", "<cmd>TroubleToggle<CR>", term_opts)

View file

@ -25,6 +25,7 @@ require("mason-lspconfig").setup({
"cmake", -- cmake
"bashls", -- shell
"ansiblels", -- ansible
"marksman",
},
automatic_installation = true,
})

View file

@ -28,6 +28,9 @@ local options = {
--vim.opt.shortmess:append "c"
vim.g.mkdp_browser = '/usr/bin/firefox'
vim.g.mkdp_auto_start = 1
for k, v in pairs(options) do
vim.opt[k] = v
end

View file

@ -44,5 +44,7 @@ Plug("nvim-telescope/telescope-ui-select.nvim") -- telescope ui
Plug("nvim-telescope/telescope-file-browser.nvim") -- telescope file browser
Plug("nvim-telescope/telescope-fzy-native.nvim") -- telescope fuzzy search
Plug 'folke/trouble.nvim' -- provides warning/error explanation tab
Plug("iamcco/markdown-preview.nvim", { ["do"] = "cd app && yarn install" }) -- markdown preview
vim.call("plug#end")