feat: open md
This commit is contained in:
@@ -14,10 +14,10 @@ require'nvim-tree'.setup {
|
||||
},
|
||||
update_focused_file = {
|
||||
-- enables the feature
|
||||
enable = false,
|
||||
enable = true,
|
||||
-- update the root directory of the tree to the one of the folder containing the file if the file is not under the current root directory
|
||||
-- only relevant when `update_focused_file.enable` is true
|
||||
update_cwd = false,
|
||||
update_cwd = true,
|
||||
-- list of buffer names / filetypes that will not update the cwd if the file isn't found under the current root directory
|
||||
-- only relevant when `update_focused_file.update_cwd` is true and `update_focused_file.enable` is true
|
||||
ignore_list = {}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
local treesitter = {
|
||||
ensure_installed = "all",
|
||||
ignore_install = {"haskell","markdown"},
|
||||
highlight = {enabled = true},
|
||||
playground = {enabled = true},
|
||||
rainbow = {enabled = false},
|
||||
@@ -8,13 +7,14 @@ local treesitter = {
|
||||
|
||||
require'nvim-treesitter.configs'.setup {
|
||||
ensure_installed = treesitter.ensure_installed, -- one of "all", "maintained" (parsers with maintainers), or a list of languages
|
||||
ignore_install = treesitter.ignore_install,
|
||||
ignore_install = {"haskell", "markdown"},
|
||||
matchup = {
|
||||
enable = true, -- mandatory, false will disable the whole extension
|
||||
-- disable = { "c", "ruby" }, -- optional, list of language that will be disabled
|
||||
},
|
||||
highlight = {
|
||||
enable = treesitter.highlight.enabled -- false will disable the whole extension
|
||||
enable = treesitter.highlight.enabled, -- false will disable the whole extension
|
||||
disable = { "markdown" },
|
||||
},
|
||||
context_commentstring = {
|
||||
enable = true,
|
||||
|
||||
@@ -131,6 +131,7 @@ local mappings = {
|
||||
},
|
||||
f = {
|
||||
name = "+File",
|
||||
m = {"<cmd>lua require'utils'.open_md()<cr>", "open a markdown file in vscode"},
|
||||
s = {"<cmd>w<cr>", "save file"},
|
||||
t = {"<cmd>NvimTreeToggle<cr>", "toggle nvim tree"},
|
||||
r = {"<cmd>RnvimrToggle<cr>", "toggle rnvimr"},
|
||||
|
||||
@@ -173,7 +173,14 @@ return require("packer").startup(function(use)
|
||||
end
|
||||
}
|
||||
|
||||
use {'SidOfc/mkdx'}
|
||||
-- markdown
|
||||
use {'godlygeek/tabular'}
|
||||
use {'preservim/vim-markdown'}
|
||||
use {
|
||||
'iamcco/markdown-preview.nvim',
|
||||
run = function() vim.fn['mkdp#util#install']() end,
|
||||
ft = {'markdown'}
|
||||
}
|
||||
|
||||
--use 'EdenEast/nightfox.nvim'
|
||||
-- use {'godlygeek/tabular', opt=true}
|
||||
|
||||
@@ -6,7 +6,7 @@ vim.o.title = true
|
||||
TERMINAL = vim.fn.expand('$TERMINAL')
|
||||
vim.cmd('let &titleold="'..TERMINAL..'"')
|
||||
vim.o.titlestring="%<%F%=%l/%L - nvim"
|
||||
vim.wo.wrap = false -- Display long lines as just one line
|
||||
vim.wo.wrap = true -- Display long lines as just one line
|
||||
vim.cmd('set whichwrap+=<,>,[,],h,l') -- move to next line with theses keys
|
||||
vim.cmd('syntax on') -- syntax highlighting
|
||||
vim.o.pumheight = 10 -- Makes popup menu smaller
|
||||
|
||||
@@ -8,6 +8,11 @@ function lv_utils.yank_filepath()
|
||||
vim.fn.setreg('+',p)
|
||||
end
|
||||
|
||||
function lv_utils.open_md()
|
||||
local p = vim.fn.expand('%:p')
|
||||
vim.fn.system("open -a typora "..p)
|
||||
end
|
||||
|
||||
function lv_utils.define_augroups(definitions) -- {{{1
|
||||
-- Create autocommand groups based on the passed definitions
|
||||
--
|
||||
|
||||
Reference in New Issue
Block a user