Compare commits
No commits in common. "b03926963f07cf22ea208bb2c73f95c5e49d3bb1" and "b04f935dc7278ea8aeccd0ec78b348f7eede5feb" have entirely different histories.
b03926963f
...
b04f935dc7
@ -158,19 +158,7 @@ local on_attach = function(client)
|
|||||||
bufmap('n', ']d', '<cmd>lua vim.diagnostic.goto_next()<cr>')
|
bufmap('n', ']d', '<cmd>lua vim.diagnostic.goto_next()<cr>')
|
||||||
end
|
end
|
||||||
|
|
||||||
lsp.gopls.setup {
|
lsp.gopls.setup { on_attach = on_attach }
|
||||||
settings = {
|
|
||||||
gopls = {
|
|
||||||
analyses = {
|
|
||||||
unusedparams = true,
|
|
||||||
unusedvariable = true,
|
|
||||||
shadow = true
|
|
||||||
},
|
|
||||||
staticcheck = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
on_attach = on_attach
|
|
||||||
}
|
|
||||||
lsp.clangd.setup { on_attach = on_attach }
|
lsp.clangd.setup { on_attach = on_attach }
|
||||||
lsp.ltex.setup { on_attach = on_attach }
|
lsp.ltex.setup { on_attach = on_attach }
|
||||||
lsp.svelte.setup { on_attach = on_attach }
|
lsp.svelte.setup { on_attach = on_attach }
|
||||||
|
@ -5,92 +5,17 @@ end
|
|||||||
|
|
||||||
|
|
||||||
treesitter.setup {
|
treesitter.setup {
|
||||||
incremental_selection = {
|
|
||||||
enable = true,
|
|
||||||
keymaps = {
|
|
||||||
-- mappings for incremental selection (visual mappings)
|
|
||||||
init_selection = "gnn", -- maps in normal mode to init the node/scope selection
|
|
||||||
node_incremental = "grn", -- increment to the upper named parent
|
|
||||||
scope_incremental = "grc", -- increment to the upper scope (as defined in locals.scm)
|
|
||||||
node_decremental = "grm" -- decrement to the previous node
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
textobjects = {
|
textobjects = {
|
||||||
-- syntax-aware textobjects
|
|
||||||
enable = true,
|
|
||||||
lsp_interop = {
|
|
||||||
enable = true,
|
|
||||||
peek_definition_code = {
|
|
||||||
["DF"] = "@function.outer",
|
|
||||||
}
|
|
||||||
},
|
|
||||||
keymaps = {
|
|
||||||
["iL"] = {
|
|
||||||
-- you can define your own textobjects directly here
|
|
||||||
go = "(function_definition) @function",
|
|
||||||
},
|
|
||||||
-- or you use the queries from supported languages with textobjects.scm
|
|
||||||
["af"] = "@function.outer",
|
|
||||||
["if"] = "@function.inner",
|
|
||||||
["aC"] = "@class.outer",
|
|
||||||
["iC"] = "@class.inner",
|
|
||||||
["ac"] = "@conditional.outer",
|
|
||||||
["ic"] = "@conditional.inner",
|
|
||||||
["ae"] = "@block.outer",
|
|
||||||
["ie"] = "@block.inner",
|
|
||||||
["al"] = "@loop.outer",
|
|
||||||
["il"] = "@loop.inner",
|
|
||||||
["is"] = "@statement.inner",
|
|
||||||
["as"] = "@statement.outer",
|
|
||||||
["ad"] = "@comment.outer",
|
|
||||||
["am"] = "@call.outer",
|
|
||||||
["im"] = "@call.inner"
|
|
||||||
},
|
|
||||||
move = {
|
|
||||||
enable = true,
|
|
||||||
set_jumps = true, -- whether to set jumps in the jumplist
|
|
||||||
goto_next_start = {
|
|
||||||
["]]"] = "@function.outer"
|
|
||||||
},
|
|
||||||
goto_next_end = {
|
|
||||||
["]["] = "@function.outer"
|
|
||||||
},
|
|
||||||
goto_previous_start = {
|
|
||||||
["[["] = "@function.outer"
|
|
||||||
},
|
|
||||||
goto_previous_end = {
|
|
||||||
["[]"] = "@function.outer"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
select = {
|
select = {
|
||||||
enable = true,
|
enable = true,
|
||||||
lookahead = true,
|
lookahead = true,
|
||||||
keymaps = {
|
keymaps = {
|
||||||
-- You can use the capture groups defined in textobjects.scm
|
['af'] = '@function.outer',
|
||||||
["af"] = "@function.outer",
|
['if'] = '@function.inner',
|
||||||
["if"] = "@function.inner",
|
['ac'] = '@class.outer',
|
||||||
["ac"] = "@class.outer",
|
['ic'] = '@class.inner',
|
||||||
["ic"] = "@class.inner",
|
|
||||||
-- Or you can define your own textobjects like this
|
|
||||||
["iF"] = {
|
|
||||||
python = "(function_definition) @function",
|
|
||||||
cpp = "(function_definition) @function",
|
|
||||||
c = "(function_definition) @function",
|
|
||||||
java = "(method_declaration) @function",
|
|
||||||
go = "(method_declaration) @function"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
swap = {
|
|
||||||
enable = true,
|
|
||||||
swap_next = {
|
|
||||||
["<leader>a"] = "@parameter.inner"
|
|
||||||
},
|
|
||||||
swap_previous = {
|
|
||||||
["<leader>A"] = "@parameter.inner"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
ensure_installed = {
|
ensure_installed = {
|
||||||
'javascript',
|
'javascript',
|
||||||
|
@ -47,7 +47,6 @@ export JAVA_HOME=/usr/local/jdk-11/
|
|||||||
export PMIX_MCA_gds='hash'
|
export PMIX_MCA_gds='hash'
|
||||||
|
|
||||||
alias top='htop'
|
alias top='htop'
|
||||||
alias ctags='uctags'
|
|
||||||
alias man='manpager.sh'
|
alias man='manpager.sh'
|
||||||
alias mutt='neomutt'
|
alias mutt='neomutt'
|
||||||
alias dvim='doas nvim'
|
alias dvim='doas nvim'
|
||||||
|
Loading…
Reference in New Issue
Block a user