https://user-images.githubusercontent.com/1681295/187396525-82a387c8-addc-4776-9a03-78da40834d45.mov
npm install -g browser-sync
npm i -g vscode-langservers-extracted
Plug 'ray-x/web-tools.nvim'
require'web-tools'.setup({
keymaps = {
rename = nil, -- by default use same setup of lspconfig
repeat_rename = '.', -- . to repeat
},
hurl = { -- hurl default
show_headers = false, -- do not show http headers
floating = false, -- use floating windows (need guihua.lua)
formatters = { -- format the result by filetype
json = { 'jq' },
html = { 'prettier', '--parser', 'html' },
},
},
})
command | Description |
---|---|
BrowserSync {args} | run browser-sync server with args |
BrowserOpen {args} | open browser-sync, if browser-sync is not start, start it with args |
BrowserPreview {-f --port 3000} | preview current file with browser sync |
BrowserRestart | restart browser sync |
Browserstop | stop browser sync |
TagRename {newname} | rename html tag |
HurlRun {args} | Run Hurl, when in Visual mode, run selected snippets |
Note: {args} is optional, if not provided, check browser-sync for all args options --port: specify port to open, if BrowserPreview port is different from BrowserSync port, open without check browser-sync server