🔧 Updated nvim with native prettier
This commit is contained in:
parent
049818537e
commit
b1c8c84752
6 changed files with 121 additions and 36 deletions
|
|
@ -98,7 +98,7 @@ vim.cmd([[nnoremap cmp :silent lua SetAutoCmp(Mode)]])
|
|||
|
||||
-- SudaWrite
|
||||
-- vim.cmd([[nnoremap sw :SudaWrite]])
|
||||
vim.keymap.set("n", "<leader>sw", ":SudaWrite")
|
||||
-- vim.keymap.set("n", "<leader>sw", ":SudaWrite")
|
||||
|
||||
-- appends backslash to end of specified number of lines (min 2)
|
||||
-- usage: 4<leader>b will append a backslash to the end of 4 lines
|
||||
|
|
@ -185,5 +185,5 @@ vim.keymap.set("v", "<A-k>", ":m '<-2<CR>gv=gv")
|
|||
-- sets 'gx' to open with default browser
|
||||
vim.keymap.set("n", "gx", function()
|
||||
local url = vim.fn.expand("<cfile>")
|
||||
vim.system({ "librewolf", url }, { detach = true })
|
||||
vim.system({ "librewolf-bin", url }, { detach = true })
|
||||
end, { silent = true })
|
||||
|
|
|
|||
|
|
@ -40,13 +40,17 @@ require("lazy").setup({
|
|||
{ "nvim-lua/plenary.nvim" },
|
||||
{ "tpope/vim-fugitive" },
|
||||
{ "tpope/vim-surround", keys = { "cs", "ds", "ys" } },
|
||||
{ "lambdalisue/suda.vim" },
|
||||
-- { "lambdalisue/suda.vim" },
|
||||
{ "junegunn/fzf" },
|
||||
{ "junegunn/fzf.vim" },
|
||||
{ "junegunn/gv.vim" },
|
||||
{ "kien/ctrlp.vim" },
|
||||
{ "mbbill/undotree", cmd = { "UndotreeToggle" } },
|
||||
{ "mason-org/mason.nvim", event = "VeryLazy", opts = { ui = { border = "rounded" } } },
|
||||
{
|
||||
"mason-org/mason.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = { ui = { border = "rounded" } },
|
||||
},
|
||||
{ "mason-org/mason-lspconfig.nvim", event = "VeryLazy" },
|
||||
{ "neovim/nvim-lspconfig", event = { "BufReadPre", "BufNewFile" } },
|
||||
{
|
||||
|
|
@ -60,6 +64,9 @@ require("lazy").setup({
|
|||
end,
|
||||
ft = { "markdown" },
|
||||
},
|
||||
-- Prettier specifically installed
|
||||
{ "nvimtools/none-ls.nvim" },
|
||||
{ "MunifTanjim/prettier.nvim" },
|
||||
-- Autocompletion/Snippets
|
||||
{ "hrsh7th/nvim-cmp" },
|
||||
{ "hrsh7th/cmp-buffer" },
|
||||
|
|
|
|||
|
|
@ -113,6 +113,14 @@ vim.api.nvim_create_autocmd("BufReadPost", {
|
|||
end,
|
||||
})
|
||||
|
||||
-- automatically runs Prettier on HTML files
|
||||
-- vim.api.nvim_create_autocmd("BufWritePre", {
|
||||
-- pattern = "*.html",
|
||||
-- callback = function()
|
||||
-- vim.cmd("Prettier")
|
||||
-- end,
|
||||
-- })
|
||||
|
||||
-- Automatically closes Nvim tree if last window open
|
||||
vim.cmd([[autocmd BufEnter * ++nested if winnr('$') == 1 && bufname() == 'NvimTree_' . tabpagenr() | quit | endif]])
|
||||
|
||||
|
|
@ -154,7 +162,7 @@ vim.g.codeium_disable_bindings = 1
|
|||
vim.g.codeium_enabled = 0
|
||||
|
||||
-- Markdown Previewer settings
|
||||
vim.g.mkdp_browser = "librewolf"
|
||||
vim.g.mkdp_browser = "librewolf-bin"
|
||||
vim.g.mkdp_theme = "light"
|
||||
|
||||
-- Create Default Mappings for NerdCommenter
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue