feat: Add better terminal
This commit is contained in:
parent
7cacef1705
commit
8633e56645
11 changed files with 107 additions and 95 deletions
|
|
@ -75,6 +75,8 @@ return {
|
|||
for w in rust_dap:gmatch("([^/]+)") do
|
||||
filename = w
|
||||
end
|
||||
filename = filename:gsub("-", "_")
|
||||
filename = string.lower(filename)
|
||||
|
||||
dap.configurations.rust = {
|
||||
{
|
||||
|
|
|
|||
|
|
@ -6,5 +6,6 @@ return {
|
|||
{ "rcarriga/nvim-notify", enabled = false },
|
||||
},
|
||||
{ { "folke/noice.nvim", enabled = false } },
|
||||
{ { "jose-elias-alvarez/null-ls.nvim", enabled = false } },
|
||||
{ { "nvimtools/none-ls.nvim", enabled = false } },
|
||||
{ { "glepnir/dashboard-nvim", enabled = false } },
|
||||
}
|
||||
|
|
|
|||
|
|
@ -189,11 +189,17 @@ return {
|
|||
local plugin = require("lazy.core.config").spec.plugins["neoconf.nvim"]
|
||||
require("neoconf").setup(require("lazy.core.plugin").values(plugin, "opts", false))
|
||||
end
|
||||
|
||||
-- setup autoformat
|
||||
require("lazyvim.plugins.lsp.format").setup(opts)
|
||||
Util.format.register(Util.lsp.formatter())
|
||||
|
||||
-- deprectaed options
|
||||
if opts.autoformat ~= nil then
|
||||
vim.g.autoformat = opts.autoformat
|
||||
end
|
||||
|
||||
-- setup formatting and keymaps
|
||||
Util.on_attach(function(client, buffer)
|
||||
Util.lsp.on_attach(function(client, buffer)
|
||||
require("config.lsp-keymap").on_attach(client, buffer)
|
||||
end)
|
||||
|
||||
|
|
@ -218,7 +224,7 @@ return {
|
|||
local inlay_hint = vim.lsp.buf.inlay_hint or vim.lsp.inlay_hint
|
||||
|
||||
if opts.inlay_hints.enabled and inlay_hint then
|
||||
Util.on_attach(function(client, buffer)
|
||||
Util.lsp.on_attach(function(client, buffer)
|
||||
if client.supports_method("textDocument/inlayHint") then
|
||||
inlay_hint(buffer, true)
|
||||
end
|
||||
|
|
@ -290,17 +296,17 @@ return {
|
|||
mlsp.setup({ ensure_installed = ensure_installed, handlers = { setup } })
|
||||
end
|
||||
|
||||
if Util.lsp_get_config("denols") and Util.lsp_get_config("tsserver") then
|
||||
if Util.lsp.get_config("denols") and Util.lsp.get_config("tsserver") then
|
||||
local is_deno = require("lspconfig.util").root_pattern("deno.json", "deno.jsonc")
|
||||
Util.lsp_disable("tsserver", is_deno)
|
||||
Util.lsp_disable("denols", function(root_dir)
|
||||
Util.lsp.disable("tsserver", is_deno)
|
||||
Util.lsp.disable("denols", function(root_dir)
|
||||
return not is_deno(root_dir)
|
||||
end)
|
||||
end
|
||||
|
||||
require("lspconfig").ltex.setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = Util.on_attach(function(client, buffer)
|
||||
on_attach = Util.lsp.on_attach(function(client, buffer)
|
||||
require("config.lsp-keymap").on_attach(client, buffer)
|
||||
require("ltex_extra").setup({
|
||||
path = vim.fn.expand("~") .. "/.local/share/ltex",
|
||||
|
|
|
|||
|
|
@ -124,18 +124,6 @@ return {
|
|||
"karb94/neoscroll.nvim",
|
||||
config = function()
|
||||
require("neoscroll").setup()
|
||||
local t = {}
|
||||
t["<A-l>"] = { "scroll", { "-vim.wo.scroll", "true", "250" } }
|
||||
t["<A-k>"] = { "scroll", { "vim.wo.scroll", "true", "250" } }
|
||||
t["<C-b>"] = { "scroll", { "-vim.api.nvim_win_get_height(0)", "true", "450" } }
|
||||
t["<C-f>"] = { "scroll", { "vim.api.nvim_win_get_height(0)", "true", "450" } }
|
||||
t["<C-y>"] = { "scroll", { "-0.10", "false", "100" } }
|
||||
t["<C-e>"] = { "scroll", { "0.10", "false", "100" } }
|
||||
t["zt"] = { "zt", { "250" } }
|
||||
t["zz"] = { "zz", { "250" } }
|
||||
t["zb"] = { "zb", { "250" } }
|
||||
|
||||
require("neoscroll.config").set_mappings(t)
|
||||
end,
|
||||
},
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue