diff options
Diffstat (limited to '.config/nvim')
| -rw-r--r-- | .config/nvim/ftdetect/ox.vim | 1 | ||||
| -rw-r--r-- | .config/nvim/live-server/package-lock.json | 6 | ||||
| -rw-r--r-- | .config/nvim/lua/map.lua | 7 | ||||
| -rw-r--r-- | .config/nvim/lua/plugin/liveserver.lua | 13 | ||||
| -rw-r--r-- | .config/nvim/lua/plugin/packer.lua | 8 | ||||
| -rw-r--r-- | .config/nvim/lua/plugin/setup.lua | 2 | ||||
| -rw-r--r-- | .config/nvim/syntax/ox.vim | 51 |
7 files changed, 85 insertions, 3 deletions
diff --git a/.config/nvim/ftdetect/ox.vim b/.config/nvim/ftdetect/ox.vim new file mode 100644 index 0000000..d42940c --- /dev/null +++ b/.config/nvim/ftdetect/ox.vim @@ -0,0 +1 @@ +au BufRead,BufNewFile *.ox set filetype=ox diff --git a/.config/nvim/live-server/package-lock.json b/.config/nvim/live-server/package-lock.json new file mode 100644 index 0000000..9527ed2 --- /dev/null +++ b/.config/nvim/live-server/package-lock.json @@ -0,0 +1,6 @@ +{ + "name": "live-server", + "lockfileVersion": 3, + "requires": true, + "packages": {} +} diff --git a/.config/nvim/lua/map.lua b/.config/nvim/lua/map.lua index f23b703..f94cd9f 100644 --- a/.config/nvim/lua/map.lua +++ b/.config/nvim/lua/map.lua @@ -12,8 +12,11 @@ vim.keymap.set("n", "<C-l>", "<C-w>l", {}) vim.keymap.set("n", "<C-u>", "u", {}) vim.keymap.set("n", "u", "", {}) -vim.keymap.set({ "v", "n" }, ".", "<C-u>", {}) -vim.keymap.set({ "v", "n" }, ",", "<C-d>", {}) +vim.keymap.set("n", "<leader>b", "^", {}) +vim.keymap.set("n", "<leader>w", "$", {}) + +vim.keymap.set({ "v", "n" }, ".", "<C-u>zz", {}) +vim.keymap.set({ "v", "n" }, ",", "<C-d>zz", {}) vim.keymap.set("o", "as", "a\"", {}) vim.keymap.set("o", "is", "i\"", {}) diff --git a/.config/nvim/lua/plugin/liveserver.lua b/.config/nvim/lua/plugin/liveserver.lua new file mode 100644 index 0000000..542a1fb --- /dev/null +++ b/.config/nvim/lua/plugin/liveserver.lua @@ -0,0 +1,13 @@ +local status_ok, live_server = pcall(require, "live_server") +if not status_ok then + return +end + +live_server.setup({ + port = 8080, + browser_command = "", -- Empty string starts up with default browser + quiet = false, + no_css_inject = false, -- Disables css injection if true, might be useful when testing out tailwindcss + install_path = vim.fn.stdpath "config" .. "/live-server/", +}) + diff --git a/.config/nvim/lua/plugin/packer.lua b/.config/nvim/lua/plugin/packer.lua index 19265c8..015463d 100644 --- a/.config/nvim/lua/plugin/packer.lua +++ b/.config/nvim/lua/plugin/packer.lua @@ -24,6 +24,14 @@ return require("packer").startup(function(use) } use { + "aurum77/live-server.nvim", + run = function() + require"live_server.util".install() + end, + cmd = { "LiveServer", "LiveServerStart", "LiveServerStop" }, + } + + use { "utilyre/barbecue.nvim", tag = "*", requires = { diff --git a/.config/nvim/lua/plugin/setup.lua b/.config/nvim/lua/plugin/setup.lua index d5cca00..69eed82 100644 --- a/.config/nvim/lua/plugin/setup.lua +++ b/.config/nvim/lua/plugin/setup.lua @@ -4,9 +4,9 @@ require("nvim-lightbulb").setup({ autocmd = { enabled = true } }) +require("plugin.liveserver") require("plugin.nvimtree") require("plugin.treesitter") -require("plugin.presence") require("plugin.telescope") require("plugin.autopairs") require("plugin.lualine") diff --git a/.config/nvim/syntax/ox.vim b/.config/nvim/syntax/ox.vim new file mode 100644 index 0000000..c5abff4 --- /dev/null +++ b/.config/nvim/syntax/ox.vim @@ -0,0 +1,51 @@ +if exists("b:current_syntax") + finish +endif + +syn keyword oxTodo contained TODO FIXME HACK +syn match oxComment /\/\/.*$/ contains=oxTodo +syn region oxMComment start=/\/\*/ end=/\*\// + +syn keyword oxStatement return var break continue +syn keyword oxFunc fn +syn keyword oxRepeat for while +syn keyword oxDeclaration fn var +syn keyword oxStructure class enum +syn keyword oxConstants true false +syn keyword oxConditional if else +syn keyword oxStorageClass global local + +syn keyword oxOperator and or +syn match oxSymOperator /[+\-\*/%]|[\>\<\=\!]\=?/ + +syn match oxIdentifier /[A-z_]+[A-z0-9_]*/ + +syn match oxNumber /\<\d\+\>/ +syn match oxNumber /\<\d\+\.\d*\%([eE][-+]\=\d\+\)\=/ +syn match oxNumber /\.\d\+\%([eE][-+]\=\d\+\)\=\>/ +syn match oxNumber /\<\d\+[eE][-+]\=\d\+\>/ + +syn match oxEscape contained /\\[ntr\\\"']/ +syn match oxStringD /\".*\"/ contains=oxEscape +syn match oxStringS /\'.*\'/ contains=oxEscape +syn match oxType /(?<=\:)\s*[A-z_]+[A-z0-9_]*/ + +let b:current_syntax = "ox" + +hi def link oxComment Comment +hi def link oxMComment Comment +hi def link oxStatement Statement +hi def link oxFunc Function +hi def link oxDeclaration Statement +hi def link oxRepeat Repeat +hi def link oxIdentifier Identifier +hi def link oxNumber Number +hi def link oxStringD String +hi def link oxStringS String +hi def link oxConstants Constant +hi def link oxOperator Operator +hi def link oxSymOperator Operator +hi def link oxConditional Conditional +hi def link oxStructure Structure +hi def link oxStorageClass StorageClass +hi def link oxType Type |
