(nvim) update
This commit is contained in:
parent
e17989de3d
commit
881cbb3575
4 changed files with 123 additions and 124 deletions
|
|
@ -111,7 +111,7 @@ return {
|
|||
local status, lspconfig = pcall(require, "lspconfig")
|
||||
|
||||
if status then
|
||||
lspconfig.tsserver.setup({})
|
||||
lspconfig.ts_ls.setup({})
|
||||
lspconfig.tailwindcss.setup({
|
||||
filetypes = {
|
||||
"templ",
|
||||
|
|
@ -130,7 +130,7 @@ return {
|
|||
lspconfig.zls.setup({})
|
||||
lspconfig.rust_analyzer.setup({})
|
||||
lspconfig.gopls.setup({})
|
||||
lspconfig.html.setup({})
|
||||
-- lspconfig.html.setup({})
|
||||
vim.filetype.add({
|
||||
extension = {
|
||||
templ = "templ",
|
||||
|
|
|
|||
|
|
@ -1,97 +1,98 @@
|
|||
return {
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
build = ":TSUpdate",
|
||||
event = {
|
||||
"BufReadPost",
|
||||
"BufNewFile"
|
||||
},
|
||||
dependencies = {
|
||||
"nvim-treesitter/nvim-treesitter-textobjects",
|
||||
},
|
||||
config = function()
|
||||
local treesitter = require("nvim-treesitter.configs")
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
build = ":TSUpdate",
|
||||
event = {
|
||||
"BufReadPost",
|
||||
"BufNewFile",
|
||||
},
|
||||
branch = "master",
|
||||
dependencies = {
|
||||
"nvim-treesitter/nvim-treesitter-textobjects",
|
||||
},
|
||||
config = function()
|
||||
local treesitter = require("nvim-treesitter.configs")
|
||||
|
||||
treesitter.setup {
|
||||
-- A list of parser names, or "all"
|
||||
ensure_installed = {
|
||||
"vimdoc",
|
||||
"javascript",
|
||||
"typescript",
|
||||
"c",
|
||||
"lua",
|
||||
"rust",
|
||||
"go",
|
||||
"gosum",
|
||||
"gomod",
|
||||
},
|
||||
-- Install parsers synchronously (only applied to `ensure_installed`)
|
||||
sync_install = false,
|
||||
-- Automatically install missing parsers when entering buffer
|
||||
auto_install = true,
|
||||
indent = {
|
||||
enable = true,
|
||||
},
|
||||
highlight = {
|
||||
enable = true,
|
||||
additional_vim_regex_highlighting = true,
|
||||
},
|
||||
incremental_selection = {
|
||||
enable = true,
|
||||
keymaps = {
|
||||
init_selection = '<leader>c',
|
||||
node_incremental = "<C-p>",
|
||||
scope_incremental = "<C-s>",
|
||||
node_decremental = "<M-p>"
|
||||
}
|
||||
},
|
||||
textobjects = {
|
||||
select = {
|
||||
enable = true,
|
||||
lookahead = true, -- Automatically jump forward to textobj, similar to targets.vim
|
||||
keymaps = {
|
||||
-- You can use the capture groups defined in textobjects.scm
|
||||
['aa'] = '@parameter.outer',
|
||||
['ia'] = '@parameter.inner',
|
||||
['af'] = '@function.outer',
|
||||
['if'] = '@function.inner',
|
||||
['ac'] = '@class.outer',
|
||||
['ic'] = '@class.inner',
|
||||
},
|
||||
},
|
||||
move = {
|
||||
enable = true,
|
||||
set_jumps = true, -- whether to set jumps in the jumplist
|
||||
goto_next_start = {
|
||||
[']m'] = '@function.outer',
|
||||
[']]'] = '@class.outer',
|
||||
},
|
||||
goto_next_end = {
|
||||
[']M'] = '@function.outer',
|
||||
[']['] = '@class.outer',
|
||||
},
|
||||
goto_previous_start = {
|
||||
['[m'] = '@function.outer',
|
||||
['[['] = '@class.outer',
|
||||
},
|
||||
goto_previous_end = {
|
||||
['[M'] = '@function.outer',
|
||||
['[]'] = '@class.outer',
|
||||
},
|
||||
},
|
||||
swap = {
|
||||
enable = true,
|
||||
swap_next = {
|
||||
['<leader>]'] = '@parameter.inner',
|
||||
},
|
||||
swap_previous = {
|
||||
['<leader>['] = '@parameter.inner',
|
||||
},
|
||||
},
|
||||
},
|
||||
autotag = {
|
||||
enable = true,
|
||||
enable_close_on_slash = false,
|
||||
}
|
||||
}
|
||||
end
|
||||
treesitter.setup({
|
||||
-- A list of parser names, or "all"
|
||||
ensure_installed = {
|
||||
"vimdoc",
|
||||
"javascript",
|
||||
"typescript",
|
||||
"c",
|
||||
"lua",
|
||||
"rust",
|
||||
"go",
|
||||
"gosum",
|
||||
"gomod",
|
||||
},
|
||||
-- Install parsers synchronously (only applied to `ensure_installed`)
|
||||
sync_install = false,
|
||||
-- Automatically install missing parsers when entering buffer
|
||||
auto_install = true,
|
||||
indent = {
|
||||
enable = true,
|
||||
},
|
||||
highlight = {
|
||||
enable = true,
|
||||
additional_vim_regex_highlighting = true,
|
||||
},
|
||||
incremental_selection = {
|
||||
enable = true,
|
||||
keymaps = {
|
||||
init_selection = "<leader>c",
|
||||
node_incremental = "<C-p>",
|
||||
scope_incremental = "<C-s>",
|
||||
node_decremental = "<M-p>",
|
||||
},
|
||||
},
|
||||
textobjects = {
|
||||
select = {
|
||||
enable = true,
|
||||
lookahead = true, -- Automatically jump forward to textobj, similar to targets.vim
|
||||
keymaps = {
|
||||
-- You can use the capture groups defined in textobjects.scm
|
||||
["aa"] = "@parameter.outer",
|
||||
["ia"] = "@parameter.inner",
|
||||
["af"] = "@function.outer",
|
||||
["if"] = "@function.inner",
|
||||
["ac"] = "@class.outer",
|
||||
["ic"] = "@class.inner",
|
||||
},
|
||||
},
|
||||
move = {
|
||||
enable = true,
|
||||
set_jumps = true, -- whether to set jumps in the jumplist
|
||||
goto_next_start = {
|
||||
["]m"] = "@function.outer",
|
||||
["]]"] = "@class.outer",
|
||||
},
|
||||
goto_next_end = {
|
||||
["]M"] = "@function.outer",
|
||||
["]["] = "@class.outer",
|
||||
},
|
||||
goto_previous_start = {
|
||||
["[m"] = "@function.outer",
|
||||
["[["] = "@class.outer",
|
||||
},
|
||||
goto_previous_end = {
|
||||
["[M"] = "@function.outer",
|
||||
["[]"] = "@class.outer",
|
||||
},
|
||||
},
|
||||
swap = {
|
||||
enable = true,
|
||||
swap_next = {
|
||||
["<leader>]"] = "@parameter.inner",
|
||||
},
|
||||
swap_previous = {
|
||||
["<leader>["] = "@parameter.inner",
|
||||
},
|
||||
},
|
||||
},
|
||||
autotag = {
|
||||
enable = false,
|
||||
enable_close_on_slash = false,
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ local dark = "catppuccin-mocha"
|
|||
function M.is_daytime()
|
||||
-- check if command exists or not
|
||||
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)
|
||||
if has_asadesuka then
|
||||
local handle = io.popen(cmd_name .. " " .. cmd_flags)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue