shrug, i forgor

This commit is contained in:
gyoder 2025-12-28 15:38:19 -07:00
parent 428c884e0d
commit a01bb5c0ed
19 changed files with 538 additions and 68 deletions

View file

@ -1,2 +1,7 @@
vim.diagnostic.config({ virtual_text = true })
vim.diagnostic.config({
virtual_text = true,
signs = true,
underline = true,
update_in_insert = false,
})

View file

@ -0,0 +1,60 @@
local function connect_to_godot_server()
-- Check if project.godot exists in current directory
local project_file = vim.fn.getcwd() .. "/project.godot"
if vim.fn.filereadable(project_file) == 1 then
local pipe_path = vim.fn.getcwd() .. "/nvim_server.pipe"
-- Create the pipe if it doesn't exist, then connect
local success = vim.fn.serverstart(pipe_path)
if success then
print("Connected to Godot server via " .. pipe_path)
else
print("Failed to create/connect to Godot server pipe: " .. pipe_path)
end
local dap = require("dap")
dap.adapters.godot = {
type = 'server',
host = '127.0.0.1',
port = 6006,
}
dap.configurations.gdscript = {
{
type = 'godot',
request = 'launch',
name = 'Launch scene',
project = '${workspaceFolder}',
launch_scene = true,
},
}
dap.configurations.cs = {
{
type = 'godot',
request = 'launch',
name = 'Launch scene',
project = '${workspaceFolder}',
launch_scene = true,
},
}
end
end
-- Auto-connect when Neovim starts
vim.api.nvim_create_autocmd("VimEnter", {
callback = connect_to_godot_server,
desc = "Auto-connect to Godot server if project.godot exists"
})
-- Optional: Also check when changing directories
vim.api.nvim_create_autocmd("DirChanged", {
callback = connect_to_godot_server,
desc = "Auto-connect to Godot server when changing to Godot project directory"
})
-- Optional: Command to manually connect
vim.api.nvim_create_user_command("GodotConnect", connect_to_godot_server, {
desc = "Manually connect to Godot server"
})

View file

@ -15,6 +15,7 @@ vim.lsp.config('pyright', {
})
vim.lsp.enable("pyright")
-- vim.lsp.enable("basedpyright")
vim.lsp.config('ty', {
on_attach = function()
@ -49,6 +50,7 @@ vim.lsp.config('zls', {
})
vim.lsp.enable("zls")
-- vim.lsp.enable("zigscient")
vim.lsp.enable("gopls")
@ -58,8 +60,40 @@ vim.lsp.enable("cspell-ls")
vim.lsp.enable("astro")
vim.lsp.config('rust_analyzer', {
on_attach = function()
print('rust-analyzer is now active in this file')
end,
})
vim.lsp.enable("rust-analyzer")
vim.lsp.enable("gdscript")
vim.lsp.config('csharp-ls', {
on_attach = function()
print('csharp-ls is now active in this file')
end,
})
vim.lsp.enable("csharp-ls")
-- https://lsp-zero.netlify.app/blog/lsp-client-features.html
vim.opt.completeopt = {'menu', 'menuone', 'noselect', 'noinsert'}
vim.opt.completeopt = { 'menu', 'menuone', 'noselect', 'noinsert' }
vim.opt.shortmess:append('c')
vim.api.nvim_create_autocmd("LspAttach", {
group = vim.api.nvim_create_augroup("lsp", { clear = true }),
callback = function(args)
vim.api.nvim_create_autocmd("BufWritePre", {
buffer = args.buf,
callback = function()
if vim.bo[args.buf].filetype == "typst" or vim.bo[args.buf].filetype == "c" then
return
end
vim.lsp.buf.format({ async = false, id = args.data.client_id })
end,
})
end
})

View file

@ -2,9 +2,9 @@ vim.cmd [[packadd packer.nvim]]
local ensure_packer = function()
local fn = vim.fn
local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim'
local install_path = fn.stdpath('data') .. '/site/pack/packer/start/packer.nvim'
if fn.empty(fn.glob(install_path)) > 0 then
fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path})
fn.system({ 'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path })
vim.cmd [[packadd packer.nvim]]
return true
end
@ -32,7 +32,7 @@ return require('packer').startup(function(use)
}
use {
'nvim-telescope/telescope.nvim', tag = '0.1.x',
requires = { {'nvim-lua/plenary.nvim'} }
requires = { { 'nvim-lua/plenary.nvim' } }
}
use {
@ -60,7 +60,7 @@ return require('packer').startup(function(use)
end
}
use {
use {
'CRAG666/betterTerm.nvim',
config = function() require('betterTerm').setup() end
}
@ -68,9 +68,9 @@ return require('packer').startup(function(use)
use {
'anurag3301/nvim-platformio.lua',
requires = {
{'akinsho/nvim-toggleterm.lua'},
{'nvim-telescope/telescope.nvim'},
{'nvim-lua/plenary.nvim'},
{ 'akinsho/nvim-toggleterm.lua' },
{ 'nvim-telescope/telescope.nvim' },
{ 'nvim-lua/plenary.nvim' },
},
config = function()
if not vim.g.is_purdue then
@ -113,28 +113,95 @@ return require('packer').startup(function(use)
use {
'f-person/git-blame.nvim',
config = function ()
config = function()
require("gitblame").setup {
gitblame_delay = 1
}
end
}
use {
'mrcjkb/rustaceanvim',
config = function() require('plugins/rust-config') end
}
-- use {
-- 'mrcjkb/rustaceanvim',
-- config = function() require('plugins/rust-config') end
-- }
use {
"NeogitOrg/neogit",
config = function ()
config = function()
require("neogit").setup {}
end
}
use "mfussenegger/nvim-dap"
use {
"mfussenegger/nvim-dap",
config = function()
local dap = require("dap")
require('dap.ext.vscode').load_launchjs(nil, {
node = { 'javascript', 'typescript' },
python = { 'python' },
go = { 'go' },
codelldb = { 'c', 'cpp', 'rust' }
})
vim.keymap.set('n', '<M-u>', function() dap.continue() end, { desc = 'DAP: Continue' })
vim.keymap.set('n', '<M-i>', function() dap.step_into() end, { desc = 'DAP: Step Into' })
vim.keymap.set('n', '<M-o>', function() dap.step_out() end, { desc = 'DAP: Step Out' })
vim.keymap.set('n', '<M-p>', function() dap.step_over() end, { desc = 'DAP: Step Over' })
vim.keymap.set('n', '<M-b>', function() dap.toggle_breakpoint() end, { desc = 'DAP: Toggle Breakpoint' })
vim.keymap.set('n', '<F5>', function() dap.continue() end)
vim.keymap.set('n', '<F10>', function() dap.step_over() end)
vim.keymap.set('n', '<F11>', function() dap.step_into() end)
vim.keymap.set('n', '<F12>', function() dap.step_out() end)
vim.keymap.set('n', '<Leader>b', function() dap.toggle_breakpoint() end)
vim.keymap.set('n', '<Leader>dr', function() dap.repl.open() end)
dap.adapters.codelldb = {
type = "executable",
command = "codelldb"
}
dap.configurations.cpp = {
{
name = "Launch file",
type = "codelldb",
request = "launch",
program = function()
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
end,
cwd = '${workspaceFolder}',
stopOnEntry = false,
},
}
end
}
use {
'stevearc/overseer.nvim',
config = function() require('overseer').setup() end
}
use 'theHamsta/nvim-dap-virtual-text'
use { "rcarriga/nvim-dap-ui", requires = {"mfussenegger/nvim-dap", "nvim-neotest/nvim-nio"} }
use {
"rcarriga/nvim-dap-ui",
requires = { "mfussenegger/nvim-dap", "nvim-neotest/nvim-nio" },
config = function()
local dap, dapui = require("dap"), require("dapui")
dapui.setup()
dap.listeners.before.attach.dapui_config = function()
dapui.open()
end
dap.listeners.before.launch.dapui_config = function()
dapui.open()
end
dap.listeners.before.event_terminated.dapui_config = function()
dapui.close()
end
dap.listeners.before.event_exited.dapui_config = function()
dapui.close()
end
end
}
use { "geigerzaehler/tree-sitter-jinja2" }
@ -176,29 +243,30 @@ return require('packer').startup(function(use)
})
-- use {
-- 'preservim/vim-pencil',
-- config = function()
-- vim.cmd([[
-- augroup PencilSetup
-- autocmd!
-- autocmd FileType markdown,text,tex,gitcommit setlocal formatoptions+=t
-- autocmd FileType markdown,text,tex,gitcommit PencilHard
-- augroup END augroup END
-- ]])
-- end
-- }
use {
'preservim/vim-pencil',
'LukasPietzschmann/telescope-tabs',
requires = { 'nvim-telescope/telescope.nvim' },
config = function()
vim.cmd([[
augroup PencilSetup
autocmd!
autocmd FileType markdown,text,tex,gitcommit setlocal formatoptions+=t
autocmd FileType markdown,text,tex,gitcommit PencilHard
augroup END augroup END
]])
require 'telescope-tabs'.setup {
-- Your custom config :^)
}
end
}
use {
'LukasPietzschmann/telescope-tabs',
requires = { 'nvim-telescope/telescope.nvim' },
config = function()
require'telescope-tabs'.setup{
-- Your custom config :^)
}
end
}
use "HiPhish/rainbow-delimiters.nvim"
------------------------
@ -207,4 +275,3 @@ return require('packer').startup(function(use)
require('packer').sync()
end
end)

View file

@ -1,6 +1,5 @@
vim.api.nvim_create_autocmd({ "BufEnter", "BufWritePost", "InsertLeave", "TextChanged" }, {
callback = function()
-- try_lint without arguments runs the linters defined in `linters_by_ft`
-- for the current filetype
require("lint").try_lint()