terminal & stuff
This commit is contained in:
1 parent
bca80aac61
commit
24108cae78
2 files changed
+9
-6
No files matched your search
@@ -22,7 +22,7 @@ m.nmap("<leader>tm", m.fcmds({
|
|||||||
"setlocal scl=no",
|
"setlocal scl=no",
|
||||||
}))
|
}))
|
||||||
local prev_buf = ""
|
local prev_buf = ""
|
||||||
m.nmap("<leader>tn", function()
|
m.nmap("<leader>i", function()
|
||||||
if(vim.fn.bufname("terminal") == "") then
|
if(vim.fn.bufname("terminal") == "") then
|
||||||
prev_buf = vim.fn.getreg("#")
|
prev_buf = vim.fn.getreg("#")
|
||||||
vim.cmd("term")
|
vim.cmd("term")
|
||||||
@@ -33,10 +33,13 @@ m.nmap("<leader>tn", function()
|
|||||||
else
|
else
|
||||||
if(vim.fn.bufname() == "terminal") then
|
if(vim.fn.bufname() == "terminal") then
|
||||||
vim.cmd("b #")
|
vim.cmd("b #")
|
||||||
vim.fn.setreg("#", prev_buf)
|
if (string.len(prev_buf) ~= 0) then
|
||||||
|
vim.fn.setreg("#", prev_buf)
|
||||||
|
end
|
||||||
else
|
else
|
||||||
prev_buf = vim.fn.getreg("#")
|
prev_buf = vim.fn.getreg("#")
|
||||||
vim.cmd("b terminal")
|
vim.cmd("b terminal")
|
||||||
|
vim.fn.feedkeys("A")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|||||||
@@ -24,14 +24,11 @@ local config = function()
|
|||||||
c.denols.setup {
|
c.denols.setup {
|
||||||
root_dir = c.util.root_pattern("deno.json", "deno.jsonc"),
|
root_dir = c.util.root_pattern("deno.json", "deno.jsonc"),
|
||||||
}
|
}
|
||||||
c.tsserver.setup {
|
c.ts_ls.setup {
|
||||||
root_dir = c.util.root_pattern("package.json", "tsconfig.json", "jsconfig.json"),
|
root_dir = c.util.root_pattern("package.json", "tsconfig.json", "jsconfig.json"),
|
||||||
single_file_support = false,
|
single_file_support = false,
|
||||||
}
|
}
|
||||||
c.csharp_ls.setup {}
|
c.csharp_ls.setup {}
|
||||||
c.typst_lsp.setup {
|
|
||||||
cmd = { "/home/bryan/repos/typst-lsp/target/release/typst-lsp" },
|
|
||||||
}
|
|
||||||
|
|
||||||
c.angularls.setup {}
|
c.angularls.setup {}
|
||||||
c.clangd.setup {}
|
c.clangd.setup {}
|
||||||
@@ -52,6 +49,9 @@ local config = function()
|
|||||||
c.hls.setup {}
|
c.hls.setup {}
|
||||||
c.slint_lsp.setup {}
|
c.slint_lsp.setup {}
|
||||||
|
|
||||||
|
require('mason').setup()
|
||||||
|
require('mason-lspconfig').setup()
|
||||||
|
|
||||||
require 'config.lsp-settings'
|
require 'config.lsp-settings'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user