(nvim) update

This commit is contained in:
jc 2024-12-30 06:51:08 -05:00
commit 881cbb3575
4 changed files with 123 additions and 124 deletions

View file

@ -15,33 +15,31 @@
"lsp-zero.nvim": { "branch": "v2.x", "commit": "ffebf6f7b0649f1eb81b37c37b75552f8ff96337" }, "lsp-zero.nvim": { "branch": "v2.x", "commit": "ffebf6f7b0649f1eb81b37c37b75552f8ff96337" },
"lualine.nvim": { "branch": "master", "commit": "2248ef254d0a1488a72041cfb45ca9caada6d994" }, "lualine.nvim": { "branch": "master", "commit": "2248ef254d0a1488a72041cfb45ca9caada6d994" },
"markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "9453e3d6cd2ca45d96e20f343e8f1b927364b630" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "8e46de9241d3997927af12196bd8faa0ed08c29a" },
"mason.nvim": { "branch": "main", "commit": "41e75af1f578e55ba050c863587cffde3556ffa6" }, "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
"mini.icons": { "branch": "main", "commit": "2d89252993fec829b24720097a687412d10f6c85" }, "mini.icons": { "branch": "main", "commit": "54686be7d58807906cb2c8c2216e0bf9c044f19a" },
"neodev.nvim": { "branch": "main", "commit": "be6bf4f5d2d3b173c9291f074130a3d29e1af78a" }, "neodev.nvim": { "branch": "main", "commit": "46aa467dca16cf3dfe27098042402066d2ae242d" },
"null-ls.nvim": { "branch": "main", "commit": "0010ea927ab7c09ef0ce9bf28c2b573fc302f5a7" }, "null-ls.nvim": { "branch": "main", "commit": "0010ea927ab7c09ef0ce9bf28c2b573fc302f5a7" },
"nvim-autopairs": { "branch": "master", "commit": "0f04d78619cce9a5af4f355968040f7d675854a1" }, "nvim-autopairs": { "branch": "master", "commit": "b464658e9b880f463b9f7e6ccddd93fb0013f559" },
"nvim-cmp": { "branch": "main", "commit": "538e37ba87284942c1d76ed38dd497e54e65b891" }, "nvim-cmp": { "branch": "main", "commit": "ca4d3330d386e76967e53b85953c170658255ecb" },
"nvim-dap": { "branch": "master", "commit": "d7749eb3d9933a75d2244820308ce442f646c7ae" }, "nvim-lspconfig": { "branch": "master", "commit": "1aa9f36b6d542dafc0b4a38c48969d036003b00a" },
"nvim-lspconfig": { "branch": "master", "commit": "eb81c7ea08d6f01d5fa4cf09e58c708efadf9b2f" }, "nvim-treesitter": { "branch": "master", "commit": "69170c93149ddb71a22bd954514806395c430c02" },
"nvim-treesitter": { "branch": "master", "commit": "25ddfde8d7167d7d81403d6809242439037d2b68" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "ad8f0a472148c3e0ae9851e26a722ee4e29b1595" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "ec1c5bdb3d87ac971749fa6c7dbc2b14884f1f6a" }, "nvim-ts-autotag": { "branch": "main", "commit": "1cca23c9da708047922d3895a71032bc0449c52d" },
"nvim-ts-autotag": { "branch": "main", "commit": "8515e48a277a2f4947d91004d9aa92c29fdc5e18" }, "nvim-ts-context-commentstring": { "branch": "main", "commit": "9c74db656c3d0b1c4392fc89a016b1910539e7c0" },
"nvim-ts-context-commentstring": { "branch": "main", "commit": "1277b4a1f451b0f18c0790e1a7f12e1e5fdebfee" }, "nvim-web-devicons": { "branch": "master", "commit": "203da76ecfbb4b192cf830665b03eb651b635c94" },
"nvim-web-devicons": { "branch": "master", "commit": "a1425903ab52a0a0460622519e827f224e5b4fee" }, "obsidian.nvim": { "branch": "main", "commit": "ae1f76a75c7ce36866e1d9342a8f6f5b9c2caf9b" },
"obsidian.nvim": { "branch": "main", "commit": "b5945fb94db35220b85c7e3ea7bc58a0b11c2ebc" }, "onedark.nvim": { "branch": "master", "commit": "67a74c275d1116d575ab25485d1bfa6b2a9c38a6" },
"onedark.nvim": { "branch": "master", "commit": "c5476a091b0f1b4e853db91c91ff941f848a1cdd" }, "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
"plenary.nvim": { "branch": "master", "commit": "55d9fe89e33efd26f532ef20223e5f9430c8b0c0" }, "rose-pine": { "branch": "main", "commit": "07a887a7bef4aacea8c7caebaf8cbf808cdc7a8e" },
"rose-pine": { "branch": "main", "commit": "92762f4fa2144c05db760ea254f4c399a56a7ef5" }, "solarized-osaka.nvim": { "branch": "main", "commit": "b023c3f3b9f1ce5b67c22e4401563d03554921cf" },
"solarized-osaka.nvim": { "branch": "main", "commit": "83b7026ac7a4e185d4ecbe99926fd94b5735e2ea" }, "telescope-file-browser.nvim": { "branch": "master", "commit": "626998e5c1b71c130d8bc6cf7abb6709b98287bb" },
"telescope-dap.nvim": { "branch": "master", "commit": "4e2d5efb92062f0b865fe59b200b5ed7793833bf" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" },
"telescope-file-browser.nvim": { "branch": "master", "commit": "98101b22402cd6d1c7e9a7e0c4718bfc98cb1625" }, "telescope.nvim": { "branch": "master", "commit": "776b509f80dd49d8205b9b0d94485568236d1192" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" }, "todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" },
"telescope.nvim": { "branch": "master", "commit": "6213322ab56eb27356fdc09a5078e41e3ea7f3bc" }, "tokyonight.nvim": { "branch": "main", "commit": "3d02469b98396dc03e87a4f4b64e109801ef6890" },
"todo-comments.nvim": { "branch": "main", "commit": "4a6737a8d70fe1ac55c64dfa47fcb189ca431872" }, "undotree": { "branch": "master", "commit": "78b5241191852ffa9bb5da5ff2ee033160798c3b" },
"tokyonight.nvim": { "branch": "main", "commit": "f247ee700b569ed43f39320413a13ba9b0aef0db" },
"undotree": { "branch": "master", "commit": "36ff7abb6b60980338344982ad4cdf03f7961ecd" },
"vim-closetag": { "branch": "master", "commit": "d0a562f8bdb107a50595aefe53b1a690460c3822" }, "vim-closetag": { "branch": "master", "commit": "d0a562f8bdb107a50595aefe53b1a690460c3822" },
"vim-floaterm": { "branch": "master", "commit": "3f01a623376957437f9376327637491b74719e38" }, "vim-floaterm": { "branch": "master", "commit": "4e28c8dd0271e10a5f55142fb6fe9b1599ee6160" },
"which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" } "which-key.nvim": { "branch": "main", "commit": "9b365a6428a9633e3eeb34dbef1b791511c54f70" }
} }

View file

@ -111,7 +111,7 @@ return {
local status, lspconfig = pcall(require, "lspconfig") local status, lspconfig = pcall(require, "lspconfig")
if status then if status then
lspconfig.tsserver.setup({}) lspconfig.ts_ls.setup({})
lspconfig.tailwindcss.setup({ lspconfig.tailwindcss.setup({
filetypes = { filetypes = {
"templ", "templ",
@ -130,7 +130,7 @@ return {
lspconfig.zls.setup({}) lspconfig.zls.setup({})
lspconfig.rust_analyzer.setup({}) lspconfig.rust_analyzer.setup({})
lspconfig.gopls.setup({}) lspconfig.gopls.setup({})
lspconfig.html.setup({}) -- lspconfig.html.setup({})
vim.filetype.add({ vim.filetype.add({
extension = { extension = {
templ = "templ", templ = "templ",

View file

@ -1,97 +1,98 @@
return { return {
'nvim-treesitter/nvim-treesitter', "nvim-treesitter/nvim-treesitter",
build = ":TSUpdate", build = ":TSUpdate",
event = { event = {
"BufReadPost", "BufReadPost",
"BufNewFile" "BufNewFile",
}, },
dependencies = { branch = "master",
"nvim-treesitter/nvim-treesitter-textobjects", dependencies = {
}, "nvim-treesitter/nvim-treesitter-textobjects",
config = function() },
local treesitter = require("nvim-treesitter.configs") config = function()
local treesitter = require("nvim-treesitter.configs")
treesitter.setup { treesitter.setup({
-- A list of parser names, or "all" -- A list of parser names, or "all"
ensure_installed = { ensure_installed = {
"vimdoc", "vimdoc",
"javascript", "javascript",
"typescript", "typescript",
"c", "c",
"lua", "lua",
"rust", "rust",
"go", "go",
"gosum", "gosum",
"gomod", "gomod",
}, },
-- Install parsers synchronously (only applied to `ensure_installed`) -- Install parsers synchronously (only applied to `ensure_installed`)
sync_install = false, sync_install = false,
-- Automatically install missing parsers when entering buffer -- Automatically install missing parsers when entering buffer
auto_install = true, auto_install = true,
indent = { indent = {
enable = true, enable = true,
}, },
highlight = { highlight = {
enable = true, enable = true,
additional_vim_regex_highlighting = true, additional_vim_regex_highlighting = true,
}, },
incremental_selection = { incremental_selection = {
enable = true, enable = true,
keymaps = { keymaps = {
init_selection = '<leader>c', init_selection = "<leader>c",
node_incremental = "<C-p>", node_incremental = "<C-p>",
scope_incremental = "<C-s>", scope_incremental = "<C-s>",
node_decremental = "<M-p>" node_decremental = "<M-p>",
} },
}, },
textobjects = { textobjects = {
select = { select = {
enable = true, enable = true,
lookahead = true, -- Automatically jump forward to textobj, similar to targets.vim lookahead = true, -- Automatically jump forward to textobj, similar to targets.vim
keymaps = { keymaps = {
-- You can use the capture groups defined in textobjects.scm -- You can use the capture groups defined in textobjects.scm
['aa'] = '@parameter.outer', ["aa"] = "@parameter.outer",
['ia'] = '@parameter.inner', ["ia"] = "@parameter.inner",
['af'] = '@function.outer', ["af"] = "@function.outer",
['if'] = '@function.inner', ["if"] = "@function.inner",
['ac'] = '@class.outer', ["ac"] = "@class.outer",
['ic'] = '@class.inner', ["ic"] = "@class.inner",
}, },
}, },
move = { move = {
enable = true, enable = true,
set_jumps = true, -- whether to set jumps in the jumplist set_jumps = true, -- whether to set jumps in the jumplist
goto_next_start = { goto_next_start = {
[']m'] = '@function.outer', ["]m"] = "@function.outer",
[']]'] = '@class.outer', ["]]"] = "@class.outer",
}, },
goto_next_end = { goto_next_end = {
[']M'] = '@function.outer', ["]M"] = "@function.outer",
[']['] = '@class.outer', ["]["] = "@class.outer",
}, },
goto_previous_start = { goto_previous_start = {
['[m'] = '@function.outer', ["[m"] = "@function.outer",
['[['] = '@class.outer', ["[["] = "@class.outer",
}, },
goto_previous_end = { goto_previous_end = {
['[M'] = '@function.outer', ["[M"] = "@function.outer",
['[]'] = '@class.outer', ["[]"] = "@class.outer",
}, },
}, },
swap = { swap = {
enable = true, enable = true,
swap_next = { swap_next = {
['<leader>]'] = '@parameter.inner', ["<leader>]"] = "@parameter.inner",
}, },
swap_previous = { swap_previous = {
['<leader>['] = '@parameter.inner', ["<leader>["] = "@parameter.inner",
}, },
}, },
}, },
autotag = { autotag = {
enable = true, enable = false,
enable_close_on_slash = false, enable_close_on_slash = false,
} },
} })
end end,
} }

View file

@ -7,7 +7,7 @@ local dark = "catppuccin-mocha"
function M.is_daytime() function M.is_daytime()
-- check if command exists or not -- check if command exists or not
local cmd_name = "asadesuka" local cmd_name = "asadesuka"
local cmd_flags = "-offset 0" local cmd_flags = "-offset 30"
local has_asadesuka = require("juancwu.utils.os").cmd_exists(cmd_name) local has_asadesuka = require("juancwu.utils.os").cmd_exists(cmd_name)
if has_asadesuka then if has_asadesuka then
local handle = io.popen(cmd_name .. " " .. cmd_flags) local handle = io.popen(cmd_name .. " " .. cmd_flags)