From 6891dbfaf28123d76271ada8805e7ee7a4996eab Mon Sep 17 00:00:00 2001 From: mrflos Date: Fri, 9 Aug 2024 12:34:10 +0300 Subject: [PATCH] macos custom tweaks --- .gitignore | 1 + dotfiles/kitty/kitty.conf | 2 ++ dotfiles/nvim/lua/plugins/markdownpreview.lua | 21 +++++++++++++++++++ 3 files changed, 24 insertions(+) create mode 100644 dotfiles/nvim/lua/plugins/markdownpreview.lua diff --git a/.gitignore b/.gitignore index 40c7108..cc56fe3 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ +.DS_Store configuration.nix diff --git a/dotfiles/kitty/kitty.conf b/dotfiles/kitty/kitty.conf index 5e74838..a4de263 100644 --- a/dotfiles/kitty/kitty.conf +++ b/dotfiles/kitty/kitty.conf @@ -91,3 +91,5 @@ background_opacity 1 #background_tint 0.99 modify_font cell_height 130% startup_session ~/.config/kitty/session.conf +hide_window_decorations titlebar-only + diff --git a/dotfiles/nvim/lua/plugins/markdownpreview.lua b/dotfiles/nvim/lua/plugins/markdownpreview.lua new file mode 100644 index 0000000..9c52ab5 --- /dev/null +++ b/dotfiles/nvim/lua/plugins/markdownpreview.lua @@ -0,0 +1,21 @@ +return { + { + -- Install markdown preview, use npx if available. + "iamcco/markdown-preview.nvim", + cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" }, + ft = { "markdown" }, + build = function(plugin) + if vim.fn.executable("npx") then + vim.cmd("!cd " .. plugin.dir .. " && cd app && npx --yes yarn install") + else + vim.cmd([[Lazy load markdown-preview.nvim]]) + vim.fn["mkdp#util#install"]() + end + end, + init = function() + if vim.fn.executable("npx") then + vim.g.mkdp_filetypes = { "markdown" } + end + end, + }, +}