This commit is contained in:
ACPaul 2026-03-07 06:49:35 -05:00
parent dabce46993
commit c95718ff32
2 changed files with 84 additions and 10 deletions

View File

@ -91,7 +91,7 @@ vim.g.mapleader = ' '
vim.g.maplocalleader = ' ' vim.g.maplocalleader = ' '
-- Set to true if you have a Nerd Font installed and selected in the terminal -- Set to true if you have a Nerd Font installed and selected in the terminal
vim.g.have_nerd_font = false vim.g.have_nerd_font = true
-- [[ Setting options ]] -- [[ Setting options ]]
-- See `:help vim.o` -- See `:help vim.o`
@ -102,7 +102,7 @@ vim.g.have_nerd_font = false
vim.o.number = true vim.o.number = true
-- You can also add relative line numbers, to help with jumping. -- You can also add relative line numbers, to help with jumping.
-- Experiment for yourself to see if you like it! -- Experiment for yourself to see if you like it!
-- vim.o.relativenumber = true vim.o.relativenumber = true
-- Enable mouse mode, can be useful for resizing splits for example! -- Enable mouse mode, can be useful for resizing splits for example!
vim.o.mouse = 'a' vim.o.mouse = 'a'
@ -159,6 +159,8 @@ vim.o.cursorline = true
-- Minimal number of screen lines to keep above and below the cursor. -- Minimal number of screen lines to keep above and below the cursor.
vim.o.scrolloff = 10 vim.o.scrolloff = 10
-- idk
vim.opt.completeopt = { 'menu', 'menuone', 'noselect' }
-- if performing an operation that would fail due to unsaved changes in the buffer (like `:q`), -- if performing an operation that would fail due to unsaved changes in the buffer (like `:q`),
-- instead raise a dialog asking if you wish to save the current file(s) -- instead raise a dialog asking if you wish to save the current file(s)
-- See `:help 'confirm'` -- See `:help 'confirm'`
@ -603,7 +605,7 @@ require('lazy').setup({
-- See `:help lsp-config` for information about keys and how to configure -- See `:help lsp-config` for information about keys and how to configure
---@type table<string, vim.lsp.Config> ---@type table<string, vim.lsp.Config>
local servers = { local servers = {
-- clangd = {}, clangd = {},
-- gopls = {}, -- gopls = {},
-- pyright = {}, -- pyright = {},
-- rust_analyzer = {}, -- rust_analyzer = {},
@ -614,6 +616,14 @@ require('lazy').setup({
-- But for many setups, the LSP (`ts_ls`) will work just fine -- But for many setups, the LSP (`ts_ls`) will work just fine
-- ts_ls = {}, -- ts_ls = {},
-- Racket language server
racket_langserver = {
cmd = { 'racket', '--lib', 'racket-langserver' },
filetypes = { 'racket' },
root_dir = require('lspconfig.util').root_pattern('.git', '.'),
single_file_support = true,
},
stylua = {}, -- Used to format Lua code stylua = {}, -- Used to format Lua code
-- Special Lua Config, as recommended by neovim help docs -- Special Lua Config, as recommended by neovim help docs
@ -646,6 +656,25 @@ require('lazy').setup({
}, },
} }
vim.filetype.add {
extension = {
gd = 'gdscript',
gdscript = 'gdscript',
gdscript3 = 'gdscript',
},
}
local lspconfig_util = require 'lspconfig.util'
vim.lsp.config.gdscript = {
cmd = { 'nc', '127.0.0.1', '6005' },
filetypes = { 'gdscript' }, -- ONLY the registered type
root_dir = lspconfig_util.root_pattern('project.godot', '.git'),
single_file_support = true,
}
vim.lsp.enable 'gdscript'
-- Ensure the servers and tools above are installed -- Ensure the servers and tools above are installed
-- --
-- To check the current status of installed tools and/or manually install -- To check the current status of installed tools and/or manually install
@ -653,14 +682,20 @@ require('lazy').setup({
-- :Mason -- :Mason
-- --
-- You can press `g?` for help in this menu. -- You can press `g?` for help in this menu.
local ensure_installed = vim.tbl_keys(servers or {})
vim.list_extend(ensure_installed, {
-- You can add other tools here that you want Mason to install
})
require('mason-tool-installer').setup { ensure_installed = ensure_installed } -- Filter out manual LSPs (like racket_langserver) that Mason cannot install
local mason_servers = {}
for name, _ in pairs(servers) do
if name ~= 'racket_langserver' then table.insert(mason_servers, name) end
end
require('mason-tool-installer').setup { ensure_installed = mason_servers }
for name, server in pairs(servers) do for name, server in pairs(servers) do
local capabilities = require('blink.cmp').get_lsp_capabilities()
server.capabilities = vim.tbl_deep_extend('force', {}, capabilities, server.capabilities or {})
vim.lsp.config(name, server) vim.lsp.config(name, server)
vim.lsp.enable(name) vim.lsp.enable(name)
end end
@ -762,6 +797,7 @@ require('lazy').setup({
-- <c-e>: Hide menu -- <c-e>: Hide menu
-- <c-k>: Toggle signature help -- <c-k>: Toggle signature help
-- --
--
-- See :h blink-cmp-config-keymap for defining your own keymap -- See :h blink-cmp-config-keymap for defining your own keymap
preset = 'default', preset = 'default',
@ -779,6 +815,15 @@ require('lazy').setup({
-- By default, you may press `<c-space>` to show the documentation. -- By default, you may press `<c-space>` to show the documentation.
-- Optionally, set `auto_show = true` to show the documentation after a delay. -- Optionally, set `auto_show = true` to show the documentation after a delay.
documentation = { auto_show = false, auto_show_delay_ms = 500 }, documentation = { auto_show = false, auto_show_delay_ms = 500 },
trigger = {
show_on_insert = true,
show_on_keyword = true,
},
keyword = {
range = 'full',
},
}, },
sources = { sources = {
@ -923,7 +968,7 @@ require('lazy').setup({
-- This is the easiest way to modularize your config. -- This is the easiest way to modularize your config.
-- --
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going. -- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
-- { import = 'custom.plugins' }, { import = 'custom.plugins' },
-- --
-- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec` -- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec`
-- Or use telescope! -- Or use telescope!

View File

@ -3,6 +3,35 @@
-- --
-- See the kickstart.nvim README for more information -- See the kickstart.nvim README for more information
vim.opt.tabstop = 8
vim.opt.shiftwidth = 8
vim.opt.softtabstop = 8
vim.opt.expandtab = true
---@module 'lazy' ---@module 'lazy'
---@type LazySpec ---@type LazySpec
return {} return {
{
'ThePrimeagen/harpoon',
dependencies = { 'nvim-lua/plenary.nvim' },
config = function()
local mark = require 'harpoon.mark'
local ui = require 'harpoon.ui'
-- Add current file to harpoon
vim.keymap.set('n', '<leader>ha', mark.add_file, { desc = 'Harpoon [A]dd file' })
-- Toggle harpoon menu
vim.keymap.set('n', '<leader>hm', ui.toggle_quick_menu, { desc = 'Harpoon [M]enu' })
-- Navigate to harpooned files (1-9)
for i = 1, 9 do
vim.keymap.set('n', '<leader>h' .. i, function() ui.nav_file(i) end, { desc = 'Harpoon go to file ' .. i })
end
-- "Alt-Tab" through harpoon files
vim.keymap.set('n', '<A-l>', ui.nav_next, { desc = 'Harpoon next file' })
vim.keymap.set('n', '<A-h>', ui.nav_prev, { desc = 'Harpoon previous file' })
end,
},
}