From 4974b6f7740814071b05b86f6286d56d0876b908 Mon Sep 17 00:00:00 2001 From: veypi Date: Tue, 10 Oct 2023 17:34:19 +0800 Subject: [PATCH] colorize snip --- lazy-lock.json | 1 + lsp-settings/rust.json | 0 lua/maps.lua | 3 +++ lua/options.lua | 2 ++ lua/plugins.lua | 14 ++++++++++++++ snippets/package.json | 4 ++++ snippets/vue.json | 9 +++++++++ 7 files changed, 33 insertions(+) create mode 100644 lsp-settings/rust.json create mode 100644 snippets/vue.json diff --git a/lazy-lock.json b/lazy-lock.json index 95f1101..2345ac2 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -23,6 +23,7 @@ "null-ls.nvim": { "branch": "main", "commit": "33b853a3933eed3137cd055aac4e539e69832ad0" }, "nvim-autopairs": { "branch": "master", "commit": "7566a86f44bb72ba2b1a609f528a27d93241502d" }, "nvim-cmp": { "branch": "main", "commit": "11102d3db12c7f8b35265ad0e17a21511e5b1e68" }, + "nvim-colorizer.lua": { "branch": "master", "commit": "36c610a9717cc9ec426a07c8e6bf3b3abcb139d6" }, "nvim-dap": { "branch": "master", "commit": "6cedcb527e264c8f25e86afa8dae74c6692dee51" }, "nvim-dap-ui": { "branch": "master", "commit": "286f682f366fbc652b38dff893569374e9433dd3" }, "nvim-lspconfig": { "branch": "master", "commit": "427378a03ffc1e1bc023275583a49b1993e524d0" }, diff --git a/lsp-settings/rust.json b/lsp-settings/rust.json new file mode 100644 index 0000000..e69de29 diff --git a/lua/maps.lua b/lua/maps.lua index 8fb23e9..d19f041 100644 --- a/lua/maps.lua +++ b/lua/maps.lua @@ -10,10 +10,13 @@ lvim.keys.normal_mode[""] = ":NvimTreeToggle" lvim.keys.normal_mode["q"] = ":bd" lvim.keys.normal_mode["Q"] = ":qa!" +lvim.keys.normal_mode["vs"] = ":split" +lvim.keys.normal_mode["vv"] = ":vsplit" lvim.keys.normal_mode["\\["] = ":BufferLineCyclePrev" lvim.keys.normal_mode["\\]"] = ":BufferLineCycleNext" + -- lvim.builtin.which_key.mappings["\["] = ":BufferLineCyclePrev" -- nmap [ :BufferLineCyclePrev -- nmap ] :BufferLineCycleNext diff --git a/lua/options.lua b/lua/options.lua index adedd08..4e8e8bb 100644 --- a/lua/options.lua +++ b/lua/options.lua @@ -1,3 +1,5 @@ +lvim.builtin.telescope.defaults.file_ignore_patterns = { "public/deps/" } +lvim.builtin.telescope.defaults.path_display = {} lvim.format_on_save.enabled = true diff --git a/lua/plugins.lua b/lua/plugins.lua index dd7b939..4a212c0 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -4,6 +4,20 @@ lvim.plugins = { config = function() end, }, + { + "norcalli/nvim-colorizer.lua", + config = function() + require("colorizer").setup({ "css", "scss", "html", "javascript", "vue", "ts" }, { + RGB = true, -- #RGB hex codes + RRGGBB = true, -- #RRGGBB hex codes + RRGGBBAA = true, -- #RRGGBBAA hex codes + rgb_fn = true, -- CSS rgb() and rgba() functions + hsl_fn = true, -- CSS hsl() and hsla() functions + css = true, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB + css_fn = true, -- Enable all CSS *functions*: rgb_fn, hsl_fn + }) + end, + }, { "okuuva/auto-save.nvim", config = function() diff --git a/snippets/package.json b/snippets/package.json index c4dacfb..df80591 100644 --- a/snippets/package.json +++ b/snippets/package.json @@ -9,6 +9,10 @@ { "language": "python", "path": "./python.json" + }, + { + "language": "vue", + "path": "./vue.json" } ] } diff --git a/snippets/vue.json b/snippets/vue.json new file mode 100644 index 0000000..fbf609b --- /dev/null +++ b/snippets/vue.json @@ -0,0 +1,9 @@ +{ + "withDefaults": { + "prefix": "withDefaults", + "body": [ + "let props = withDefaults(defineProps<{\n}>(),\n {}\n)" + ], + "description": "withDefaults" + } +}