feat(remote): added remote (ssh) functionality, that's it.

This commit is contained in:
devaine 2025-12-25 14:03:20 -06:00
commit 2559cfdbd9
Signed by: devaine
GPG key ID: 954B1DCAC6FF84EE
5 changed files with 78 additions and 13 deletions

View file

@ -45,6 +45,14 @@ keybind("i", "jk", "<Esc>", { desc = "Keybind set for Justin" })
keybind("n", "<leader>mm", "<Cmd>Neotree toggle<CR>", { desc = "Toggle File Explorer" })
keybind("n", "<leader>jj", "<Cmd>Neotree action=focus<CR>", { desc = "Focus on file explorer" })
-- open floating terminal
-- to see toggling, see dev-utils.lua for closing function
keybind('n', '<C-Space>', '<CMD>lua require("FTerm").open()<CR>')
-- remote connection
keybind('n', '<leader>;;', '<CMD>RemoteStart<CR>')
-- file handling
opt.backup = false
opt.writebackup = false

View file

@ -5,7 +5,7 @@ return {
branch = 'master',
lazy = false,
build = ":TSUpdate",
config = function ()
config = function()
require("nvim-treesitter.configs").setup({
ensure_installed = {
"lua",
@ -81,4 +81,26 @@ return {
main = "ibl",
opts = {},
},
-- Floating terminal
{
"numToStr/FTerm.nvim",
config = function()
-- truly toggle floating terminal (auto closes floating terminal)
-- thank you: https://github.com/numToStr/FTerm.nvim/issues/78#issuecomment-1432326116
local function create_autocmd(pattern, key, term)
vim.api.nvim_create_autocmd("FileType", {
pattern = pattern,
callback = function(event)
local t = term
vim.keymap.set("t", key, function() t:close() end, { buffer = event.buf, silent = true })
end,
})
end
local fterm = require("FTerm")
fterm.setup({})
create_autocmd("FTerm", "<C-Space>", fterm)
end
}
}

View file

@ -8,6 +8,7 @@ return {
require("mason").setup()
require("mason-lspconfig").setup({
-- Ensure the install of these language servers
-- :MasonInstall shellcheck black shfmt
ensure_installed = {
"lua_ls",
"clangd",
@ -21,10 +22,14 @@ return {
})
end,
},
{
"neovim/nvim-lspconfig",
lazy = false,
config = function()
--vim.diagnostic.config({ virtual_lines = true })
--vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled())
local caps = vim.lsp.protocol.make_client_capabilities()
local capabilities = require("blink.cmp").get_lsp_capabilities(caps)
capabilities.textDocument.completion.completionItem.snippetSupport = true
@ -72,4 +77,18 @@ return {
})
end,
},
{
"mfussenegger/nvim-jdtls",
config = function()
vim.lsp.config("jdtls", {
settings = {
java = {
-- Custom eclipse.jdt.ls options go here
},
},
})
vim.lsp.enable("jdtls")
end
}
}

12
lua/plugins/remote.lua Normal file
View file

@ -0,0 +1,12 @@
return {
{
"amitds1997/remote-nvim.nvim",
version = "*",
dependencies = {
"nvim-lua/plenary.nvim",
"MunifTanjim/nui.nvim",
"nvim-telescope/telescope.nvim"
},
config = true
}
}