godot and telescope ripgrep

This commit is contained in:
Christian Nieves
2025-03-16 16:38:34 -05:00
parent f595b1fcfa
commit 76686a0e87
9 changed files with 240 additions and 217 deletions

View File

@ -13,35 +13,37 @@ decorations = "None"
[colors] [colors]
draw_bold_text_with_bright_colors = true draw_bold_text_with_bright_colors = true
# Default colors
[colors.primary]
background = '#1e2024'
foreground = '#a1a3a8'
# Normal colors
[colors.normal]
black = '#27272a'
blue = '#5e7fdd'
cyan = '#97c3fa'
green = '#90b99f'
magenta = '#e29eca'
red = '#d45d9e'
white = '#c9c7cd'
yellow = '#f0ea2d'
# Bright colors
[colors.bright] [colors.bright]
black = "#949494" black = '#353539'
blue = "#74b2ff" blue = '#a7b3dd'
cyan = "#85dc85" cyan = '#6de6fc'
green = "#36c692" green = '#a8fc8d'
magenta = "#ae81ff" magenta = '#eb4cce'
red = "#ff5189" red = '#ca72de'
white = "#e4e4e4" white = '#c9c7cd'
yellow = "#c6c684" yellow = '#f7f48d'
[colors.cursor] [colors.cursor]
cursor = "#8e8e8e" cursor = "#8e8e8e"
text = "#080808" text = "#080808"
[colors.normal]
black = "#323437"
blue = "#80a0ff"
cyan = "#79dac8"
green = "#8cc85f"
magenta = "#cf87e8"
red = "#ff5454"
white = "#c6c6c6"
yellow = "#e3c78a"
[colors.primary]
background = "#080808"
bright_foreground = "#eeeeee"
foreground = "#bdbdbd"
[colors.selection] [colors.selection]
background = "#b2ceee" background = "#b2ceee"
text = "#080808" text = "#080808"

View File

@ -25,14 +25,6 @@ end
require("lazy").setup({ require("lazy").setup({
-- this entry tells lazy.nvim to load the list of of *.lua files from plugins/ -- this entry tells lazy.nvim to load the list of of *.lua files from plugins/
import = "plugins", import = "plugins",
-- Dev configuration
dev = {
-- Directory where you store your local plugin projects
path = "~/neovim-plugins/squk/",
-- @type string[] plugins that match these patterns will use your local versions instead of being fetched from GitHub
patterns = { "squk" },
fallback = false, -- Fallback to git when local plugin doesn't exist
},
}) })
vim.opt.undodir = vim.fn.expand("$HOME") .. "/.undo/" vim.opt.undodir = vim.fn.expand("$HOME") .. "/.undo/"

View File

@ -0,0 +1,9 @@
vim.api.nvim_create_autocmd({ "BufNewFile", "BufRead" }, {
pattern = "*.wgsl",
callback = function()
local lspconfig = require("lspconfig")
lspconfig.wgsl_analyzer.setup({})
vim.bo.filetype = "wgsl"
end,
})

View File

@ -1,17 +0,0 @@
local use_google = require("utils").use_google
return {
{
"Exafunction/codeium.nvim",
-- commit = "b1ff0d6c993e3d87a4362d2ccd6c660f7444599f",
event = "VeryLazy",
-- event = "InsertEnter",
cond = not use_google(),
dependencies = {
"nvim-lua/plenary.nvim",
"hrsh7th/nvim-cmp",
},
config = function()
require("codeium").setup({})
end,
},
}

View File

@ -61,12 +61,11 @@ return {
-- Conform will run multiple formatters sequentially -- Conform will run multiple formatters sequentially
-- go = { "goimports", "gofmt" }, -- go = { "goimports", "gofmt" },
-- Use a sub-list to run only the first available formatter -- Use a sub-list to run only the first available formatter
-- javascript = { { "prettierd", "prettier" } },
lua = { "stylua" }, lua = { "stylua" },
-- Conform will run multiple formatters sequentially -- Conform will run multiple formatters sequentially
python = { "isort", "black" }, python = { "isort" },
-- Use a sub-list to run only the first available formatter -- Use a sub-list to run only the first available formatter
javascript = { { "prettierd", "prettier" } }, javascript = { { "prettier" } },
gdscript = { "gdformat" }, gdscript = { "gdformat" },
ron = { "ronfmt" }, ron = { "ronfmt" },
dashboard = {}, dashboard = {},

View File

@ -83,7 +83,7 @@ return {
{ "<C-g>", ":lua vim.lsp.buf.signature_help()<CR>", mode = "i" }, { "<C-g>", ":lua vim.lsp.buf.signature_help()<CR>", mode = "i" },
}, },
config = function() config = function()
local nvim_lspconfig = require("lspconfig") local lspconfig = require("lspconfig")
local lsp_configs = require("lspconfig.configs") local lsp_configs = require("lspconfig.configs")
lsp_configs.ciderlsp = { lsp_configs.ciderlsp = {
@ -107,18 +107,20 @@ return {
"typescript", "typescript",
}, },
offset_encoding = "utf-8", offset_encoding = "utf-8",
root_dir = nvim_lspconfig.util.root_pattern(".citc"), root_dir = lspconfig.util.root_pattern(".citc"),
settings = {}, settings = {},
}, },
} }
if use_google() then if use_google() then
nvim_lspconfig.ciderlsp.setup({}) lspconfig.ciderlsp.setup({})
end end
nvim_lspconfig.wgsl_analyzer.setup({})
require("lspconfig").gdscript.setup({})
vim.cmd([[autocmd FileType gdscript setlocal commentstring=#\ %s]]) vim.cmd([[autocmd FileType gdscript setlocal commentstring=#\ %s]])
vim.cmd([[autocmd FileType gdscript setlocal autoindent noexpandtab tabstop=4 shiftwidth=4]]) vim.cmd([[autocmd FileType gdscript setlocal autoindent noexpandtab tabstop=4 shiftwidth=4]])
require("lspconfig").gdshader_lsp.setup({})
end, end,
}, },
} }

View File

@ -6,6 +6,16 @@ return {
ft = { "rust" }, ft = { "rust" },
config = function(_, opts) config = function(_, opts)
vim.g.rustaceanvim = vim.tbl_deep_extend("keep", vim.g.rustaceanvim or {}, opts or {}) vim.g.rustaceanvim = vim.tbl_deep_extend("keep", vim.g.rustaceanvim or {}, opts or {})
for _, method in ipairs({ "textDocument/diagnostic", "workspace/diagnostic" }) do
local default_diagnostic_handler = vim.lsp.handlers[method]
vim.lsp.handlers[method] = function(err, result, context, config)
if err ~= nil and err.code == -32802 then
return
end
return default_diagnostic_handler(err, result, context, config)
end
end
end, end,
opts = { opts = {
server = { server = {

View File

@ -14,16 +14,6 @@ _G.search_cwd = function()
builtin.find_files({ cwd = utils.buffer_dir() }) builtin.find_files({ cwd = utils.buffer_dir() })
end end
_G.live_grep = function(search_dirs)
require("telescope.builtin").live_grep({
search_dirs = search_dirs,
})
end
_G.live_grep_cword = function(search_dirs)
require("telescope.builtin").live_grep({ search_dirs = search_dirs })
end
local function exe(cmd) local function exe(cmd)
return vim.split(vim.fn.system(cmd), "\n") return vim.split(vim.fn.system(cmd), "\n")
end end
@ -39,9 +29,9 @@ end
-- stylua: ignore -- stylua: ignore
local keys = { local keys = {
{ "<leader>e", ":lua search_cwd()<CR>", desc = "Find Files in Buffer Directory" }, { "<leader>e", ":lua search_cwd()<CR>", desc = "Find Files in Buffer Directory" },
{ "<leader>ts", require('telescope.builtin').live_grep },
{ "<leader>tb", ":Telescope buffers<CR>" }, { "<leader>tb", ":Telescope buffers<CR>" },
{ "<leader>TS", function() require('telescope.builtin').live_grep { default_text = vim.fn.expand("<cword>") } end, }, -- { "<leader>ts", require('telescope.builtin').live_grep },
-- { "<leader>TS", function() require('telescope.builtin').live_grep { default_text = vim.fn.expand("<cword>") } end, },
{ {
"<leader>t.", "<leader>t.",
function() function()
@ -123,9 +113,32 @@ return {
end end
end, end,
}, },
{
"nvim-telescope/telescope-live-grep-args.nvim",
keys = {
{
"<leader>ts",
function()
require("telescope").extensions.live_grep_args.live_grep_args()
end,
},
{
"<leader>TS",
function()
require("telescope").extensions.live_grep_args.live_grep_args({
default_text = vim.fn.expand("<cword>"),
})
end,
},
},
config = function()
require("telescope").load_extension("live_grep_args")
end,
},
{ {
"nvim-telescope/telescope.nvim", "nvim-telescope/telescope.nvim",
dependencies = { dependencies = {
"nvim-telescope/telescope-live-grep-args.nvim",
"mfussenegger/nvim-dap", "mfussenegger/nvim-dap",
"smartpde/telescope-recent-files", "smartpde/telescope-recent-files",
"rcarriga/nvim-dap-ui", "rcarriga/nvim-dap-ui",

View File

@ -1,6 +1,19 @@
local use_google = require("utils").use_google local use_google = require("utils").use_google
return { return {
{
"squk/ableton.nvim",
lazy = false,
cond = not use_google(),
priority = 1000,
dir = "~/neovim-plugins/squk/ableton.nvim",
opts = {
variant = "cooler",
},
config = function()
vim.cmd("colorscheme ableton")
end,
},
{ {
"dgox16/oldworld.nvim", "dgox16/oldworld.nvim",
lazy = false, lazy = false,
@ -10,7 +23,7 @@ return {
variant = "cooler", variant = "cooler",
}, },
config = function() config = function()
vim.cmd("colorscheme oldworld") -- vim.cmd("colorscheme oldworld")
end, end,
}, },
{ {