feat: add markdown preview
This commit is contained in:
parent
7dba0b18be
commit
6f9ecd5c96
5 changed files with 41 additions and 5 deletions
31
nvim/keymap.md
Normal file
31
nvim/keymap.md
Normal 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
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
local opts = { noremap = true, silent = true }
|
local opts = { noremap = true, silent = true }
|
||||||
local term_opts = { silent = true }
|
local term_opts = { silent = true }
|
||||||
local keymap = vim.api.nvim_set_keymap
|
local keymap = vim.api.nvim_set_keymap
|
||||||
local builtin = require("telescope.builtin")
|
|
||||||
|
|
||||||
-- space leader
|
-- space leader
|
||||||
vim.g.mapleader = " "
|
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)
|
keymap("n", "<F4>", ":lua vim.lsp.buf.format { async = true }<CR>", opts)
|
||||||
|
|
||||||
-- telescope
|
-- telescope
|
||||||
keymap("n", "ff", ":lua builtin.find_files", {})
|
keymap("n", "ff", ':lua require("telescope.builtin").find_files()<CR>', {})
|
||||||
keymap("n", "fg", ":lua builtin.live_grep", {})
|
keymap("n", "fg", ':lua require("telescope.builtin").live_grep()<CR>', {})
|
||||||
keymap("n", "fb", ":lua builtin.buffers", {})
|
keymap("n", "fb", ':lua require("telescope.builtin").buffers()<CR>', {})
|
||||||
keymap("n", "fh", ":lua builtin.help_tags", {})
|
keymap("n", "fh", ':lua require("telescope.builtin").help_tags()<CR>', {})
|
||||||
|
|
||||||
-- trouble
|
-- trouble
|
||||||
keymap("n", "<C-f>", "<cmd>TroubleToggle<CR>", term_opts)
|
keymap("n", "<C-f>", "<cmd>TroubleToggle<CR>", term_opts)
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,7 @@ require("mason-lspconfig").setup({
|
||||||
"cmake", -- cmake
|
"cmake", -- cmake
|
||||||
"bashls", -- shell
|
"bashls", -- shell
|
||||||
"ansiblels", -- ansible
|
"ansiblels", -- ansible
|
||||||
|
"marksman",
|
||||||
},
|
},
|
||||||
automatic_installation = true,
|
automatic_installation = true,
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,9 @@ local options = {
|
||||||
|
|
||||||
--vim.opt.shortmess:append "c"
|
--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
|
for k, v in pairs(options) do
|
||||||
vim.opt[k] = v
|
vim.opt[k] = v
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -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-file-browser.nvim") -- telescope file browser
|
||||||
Plug("nvim-telescope/telescope-fzy-native.nvim") -- telescope fuzzy search
|
Plug("nvim-telescope/telescope-fzy-native.nvim") -- telescope fuzzy search
|
||||||
Plug 'folke/trouble.nvim' -- provides warning/error explanation tab
|
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")
|
vim.call("plug#end")
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue