Compare commits

...

10 commits

8 changed files with 373 additions and 204 deletions

View file

@ -3,9 +3,9 @@
# The current setup # The current setup
Terminal Emulator: [Kitty](https://sw.kovidgoyal.net/kitty/) Terminal Emulator: [Ghostty](https://ghostty.org/)
- fast GPU accelerated terminal emulator - Zig-based terminal emulator
- removes need for tmux (appreciate it) - uses platform-native UI & GPU acceleration (e.g. MacOS secure input for passwords)
Shell: [fish](https://fishshell.com/) Shell: [fish](https://fishshell.com/)
- completions - completions

48
ghostty/config Normal file
View file

@ -0,0 +1,48 @@
### Configuration
# Font
font-family = "Hack Nerd Font Mono"
font-family-bold = "Hack Nerd Font Mono"
font-family-italic = "Hack Nerd Font Mono"
font-family-bold-italic = "Hack Nerd Font Mono"
font-family = "Hack Nerd Font Mono"
font-size = 15.0
# Theme
theme = "detuned"
# Cursor
cursor-style = "block"
mouse-hide-while-typing = true
background-opacity = 0.9
background-blur = 10
unfocused-split-opacity = 1
# Window
window-padding-x = 0
window-padding-y = 0
macos-titlebar-style = "tabs"
macos-option-as-alt = left
### Keybinds
# Splits
keybind = ctrl+a>v=new_split:left
keybind = ctrl+a>n=new_split:down
keybind = ctrl+a>z=toggle_split_zoom
keybind = alt+h=goto_split:left
keybind = alt+l=goto_split:right
keybind = alt+j=goto_split:down
keybind = alt+k=goto_split:up
keybind = ctrl+a>l=resize_split:right,60
keybind = ctrl+a>h=resize_split:left,60
keybind = ctrl+a>j=resize_split:down,60
keybind = ctrl+a>k=resize_split:up,60
# Tabs
keybind = cmd+t=new_tab
keybind = cmd+w=close_tab
keybind = ctrl+tab=next_tab
keybind = ctrl+shift>tab=previous_tab
keybind = ctrl+a>d=close_surface
# Terminal
keybind = global:cmd+grave_accent=toggle_quick_terminal
shell-integration = fish

View file

@ -7,6 +7,7 @@ local M = {}
M.base46 = { M.base46 = {
theme = "mountain", theme = "mountain",
transparency = true,
hl_override = { hl_override = {
Comment = { italic = true }, Comment = { italic = true },

View file

@ -0,0 +1,14 @@
return {
provider = "openrouter", -- Recommend using Claude
vendors = {
["openrouter"] = {
__inherited_from = "openai",
endpoint = "https://openrouter.ai/api/v1",
api_key_name = "OPENROUTER_API_KEY_AVANTE",
model = "anthropic/claude-3.7-sonnet",
temperature = 0,
max_tokens = 4096,
},
},
auto_suggestions_provider = nil, -- Since auto-suggestions are a high-frequency operation and therefore expensive, it is recommended to specify an inexpensive provider or even a free provider: copilot
}

View file

@ -1,24 +1,28 @@
local options = { local options = {
formatters_by_ft = { formatters_by_ft = {
lua = { "stylua" }, lua = { "stylua" },
css = { "prettier" }, css = { "prettier" },
html = { "prettier" }, html = { "prettier" },
python = { "ruff_format", "ruff_fix", "ruff_organize_imports" }, python = { "ruff_format", "ruff_fix", "ruff_organize_imports" },
go = { "goimports", "gofmt" }, tf = { "tflint", "terraform-ls" },
json = { "jq" }, go = { "goimports", "gofmt" },
}, json = { "jq" },
templ = { "templ" },
ts = { "typescript-language-server" },
zig = { "zls" },
},
format_on_save = { format_on_save = {
-- These options will be passed to conform.format() -- These options will be passed to conform.format()
timeout_ms = 500, timeout_ms = 500,
lsp_format = "fallback", lsp_format = "fallback",
}, },
-- Set the log level. Use `:ConformInfo` to see the location of the log file. -- Set the log level. Use `:ConformInfo` to see the location of the log file.
log_level = vim.log.levels.ERROR, log_level = vim.log.levels.ERROR,
-- Conform will notify you when a formatter errors -- Conform will notify you when a formatter errors
notify_on_error = true, notify_on_error = true,
-- Conform will notify you when no formatters are available for the buffer -- Conform will notify you when no formatters are available for the buffer
notify_no_formatters = true, notify_no_formatters = true,
} }
return options return options

11
nvim/lua/configs/edgy.lua Normal file
View file

@ -0,0 +1,11 @@
return {
animate = {
enabled = false,
},
exit_when_last = false,
right = {
{
ft = "trouble",
},
},
}

View file

@ -1,53 +1,55 @@
local configs = require "nvchad.configs.lspconfig" local configs = require("nvchad.configs.lspconfig")
configs.defaults() configs.defaults()
local servers = { local servers = {
html = {}, html = {},
cssls = {}, cssls = {},
gopls = { gopls = {
analyses = { analyses = {
unusedparams = true, unusedparams = true,
}, },
staticcheck = true, staticcheck = true,
gofumpt = true, gofumpt = true,
}, },
ruff = { ruff = {
lint = { lint = {
run = "onSave", run = "onSave",
}, },
}, },
zls = {}, zls = {},
terraformls = {},
templ = {},
pyright = { pyright = {
settings = { settings = {
python = { python = {
analysis = { analysis = {
autoSearchPaths = true, autoSearchPaths = true,
typeCheckingMode = "basic", typeCheckingMode = "basic",
}, },
venvPath = vim.fn.getcwd() .. "/.venv", venvPath = vim.fn.getcwd() .. "/.venv",
pythonPath = vim.fn.getcwd() .. "/.venv/bin/python3", pythonPath = vim.fn.getcwd() .. "/.venv/bin/python3",
}, },
}, },
}, },
ts_ls = { ts_ls = {
settings = { settings = {
completions = { completions = {
completeFunctionCalls = true, completeFunctionCalls = true,
}, },
}, },
}, },
} }
local on_attach = function(client, bufnr) local on_attach = function(client, bufnr)
configs.on_attach(client, bufnr) configs.on_attach(client, bufnr)
client.server_capabilities.documentFormattingProvider = true client.server_capabilities.documentFormattingProvider = true
end end
for name, opts in pairs(servers) do for name, opts in pairs(servers) do
opts.on_init = configs.on_init opts.on_init = configs.on_init
opts.on_attach = on_attach opts.on_attach = on_attach
opts.capabilities = configs.capabilities opts.capabilities = configs.capabilities
require("lspconfig")[name].setup(opts) require("lspconfig")[name].setup(opts)
end end

View file

@ -1,143 +1,232 @@
return { return {
{ {
"stevearc/conform.nvim", "stevearc/conform.nvim",
event = "BufWritePre", -- uncomment for format on save event = "BufWritePre", -- uncomment for format on save
opts = require "configs.conform", opts = require("configs.conform"),
}, },
-- These are some examples, uncomment them if you want to see them work! -- These are some examples, uncomment them if you want to see them work!
{ {
"neovim/nvim-lspconfig", "neovim/nvim-lspconfig",
config = function() config = function()
require "configs.lspconfig" require("configs.lspconfig")
end, end,
}, },
{ {
"nvim-treesitter/nvim-treesitter", "nvim-treesitter/nvim-treesitter",
opts = { opts = {
ensure_installed = { ensure_installed = {
"vim", "vim",
"lua", "lua",
"vimdoc", "vimdoc",
"html", "html",
"css", "css",
"python", "python",
"typescript", "typescript",
"go", "go",
}, "terraform",
}, },
}, },
{ },
"tpope/vim-fugitive", {
cmd = { "Git", "G", "Gdiffsplit", "Gvdiffsplit", "Gwrite", "Gread", "Ggrep", "GMove", "GDelete", "GBrowse" }, "tpope/vim-fugitive",
keys = { cmd = { "Git", "G", "Gdiffsplit", "Gvdiffsplit", "Gwrite", "Gread", "Ggrep", "GMove", "GDelete", "GBrowse" },
{ "<leader>gs", "<cmd>vertical Git<cr>" }, keys = {
desc = "Open Fugitive", { "<leader>gs", "<cmd>vertical Git<cr>" },
}, desc = "Open Fugitive",
opts = { },
enabled = true, opts = {
}, enabled = true,
dependencies = { },
"tpope/vim-rhubarb", dependencies = {
}, "tpope/vim-rhubarb",
}, },
{ "tpope/vim-rhubarb", opts = { enabled = true } }, },
{ { "tpope/vim-rhubarb", opts = { enabled = true } },
"folke/zen-mode.nvim", {
cmd = "ZenMode", "folke/zen-mode.nvim",
opts = { cmd = "ZenMode",
plugins = { opts = {
kitty = { plugins = {
enabled = true, kitty = {
font = "+4", enabled = true,
}, font = "+4",
}, },
}, },
}, },
{ },
"folke/trouble.nvim", {
opts = { "folke/trouble.nvim",
auto_close = true, opts = {
auto_open = false, auto_close = true,
warn_no_results = false, auto_open = false,
modes = { warn_no_results = false,
symbols = { -- Configure symbols mode modes = {
win = { symbols = { -- Configure symbols mode
type = "split", -- split window win = {
relative = "win", -- relative to current window type = "split", -- split window
position = "right", -- right side relative = "win", -- relative to current window
size = 0.15, -- 30% of the window position = "left", -- right side
}, size = 0.20, -- 30% of the window
}, },
}, },
}, -- for default options, refer to the configuration section for custom setup. diagnostics = {
cmd = "Trouble", win = {
keys = { type = "split",
{ relative = "win",
"<leader>xx", position = "bottom",
"<cmd>Trouble diagnostics toggle<cr>", size = 0.30,
desc = "Diagnostics (Trouble)", },
}, },
{ lsp = { -- Configure LSP references mode
"<leader>xX", win = {
"<cmd>Trouble diagnostics toggle filter.buf=0<cr>", type = "split", -- split window
desc = "Buffer Diagnostics (Trouble)", relative = "win", -- relative to current window
}, position = "right", -- appear below
{ size = 0.25, -- 25% of the window height
"<leader>cs", },
"<cmd>Trouble symbols toggle focus=false<cr>", },
desc = "Symbols (Trouble)", preview = {
}, mode = "diagnostics",
{ preview = {
"<leader>cl", type = "split",
"<cmd>Trouble lsp toggle focus=false win.position=right<cr>", relative = "win",
desc = "LSP Definitions / references / ... (Trouble)", position = "right",
}, size = 0.3,
{ },
"<leader>xL", },
"<cmd>Trouble loclist toggle<cr>", preview_float = {
desc = "Location List (Trouble)", mode = "diagnostics",
}, preview = {
{ type = "float",
"<leader>xQ", relative = "editor",
"<cmd>Trouble qflist toggle<cr>", border = "rounded",
desc = "Quickfix List (Trouble)", title = "Preview",
}, title_pos = "center",
}, position = { 0, -2 },
}, size = { width = 0.3, height = 0.5 },
{ zindex = 200,
"folke/noice.nvim", },
event = "VeryLazy", },
opts = { },
lsp = { }, -- for default options, refer to the configuration section for custom setup.
-- override markdown rendering so that **cmp** and other plugins use **Treesitter** cmd = "Trouble",
override = { keys = {
["vim.lsp.util.convert_input_to_markdown_lines"] = true, {
["vim.lsp.util.stylize_markdown"] = true, "<leader>xx",
["cmp.entry.get_documentation"] = true, -- requires hrsh7th/nvim-cmp "<cmd>Trouble preview toggle<cr>",
}, desc = "Diagnostics (Trouble)",
}, },
-- you can enable a preset for easier configuration {
presets = { "<leader>xX",
bottom_search = true, -- use a classic bottom cmdline for search "<cmd>Trouble diagnostics toggle filter.buf=0<cr>",
command_palette = true, -- position the cmdline and popupmenu together desc = "Buffer Diagnostics (Trouble)",
long_message_to_split = true, -- long messages will be sent to a split },
inc_rename = false, -- enables an input dialog for inc-rename.nvim {
lsp_doc_border = false, -- add a border to hover docs and signature help "<leader>cs",
}, "<cmd>Trouble symbols toggle focus=false<cr>",
}, desc = "Symbols (Trouble)",
}, },
{ {
"knubie/vim-kitty-navigator", "<leader>cl",
enabled = true, "<cmd>Trouble lsp toggle focus=false<cr>",
lazy = false, desc = "LSP Definitions / references / ... (Trouble)",
build = { },
"cp ./*.py ~/.config/kitty/", {
}, "<leader>xL",
}, "<cmd>Trouble loclist toggle<cr>",
{ desc = "Location List (Trouble)",
"gfontenot/vim-xcode", },
enabled = true, {
}, "<leader>xQ",
"<cmd>Trouble qflist toggle<cr>",
desc = "Quickfix List (Trouble)",
},
},
},
{
"folke/noice.nvim",
event = "VeryLazy",
opts = {
lsp = {
-- override markdown rendering so that **cmp** and other plugins use **Treesitter**
override = {
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
["vim.lsp.util.stylize_markdown"] = true,
["cmp.entry.get_documentation"] = true, -- requires hrsh7th/nvim-cmp
},
},
-- you can enable a preset for easier configuration
presets = {
bottom_search = true, -- use a classic bottom cmdline for search
command_palette = true, -- position the cmdline and popupmenu together
long_message_to_split = true, -- long messages will be sent to a split
inc_rename = false, -- enables an input dialog for inc-rename.nvim
lsp_doc_border = false, -- add a border to hover docs and signature help
},
},
},
{
"knubie/vim-kitty-navigator",
enabled = true,
lazy = false,
build = {
"cp ./*.py ~/.config/kitty/",
},
},
{
"gfontenot/vim-xcode",
enabled = true,
},
{
"yetone/avante.nvim",
event = "VeryLazy",
lazy = false,
version = false, -- set this to "*" if you want to always pull the latest change, false to update on release
opts = require("configs.avante"),
-- if you want to build from source then do `make BUILD_FROM_SOURCE=true`
build = "make",
-- build = "powershell -ExecutionPolicy Bypass -File Build.ps1 -BuildFromSource false" -- for windows
dependencies = {
"stevearc/dressing.nvim",
"nvim-lua/plenary.nvim",
"MunifTanjim/nui.nvim",
--- The below dependencies are optional,
"hrsh7th/nvim-cmp", -- autocompletion for avante commands and mentions
"nvim-tree/nvim-web-devicons", -- or echasnovski/mini.icons
"zbirenbaum/copilot.lua", -- for providers='copilot'
{
-- support for image pasting
"HakonHarnes/img-clip.nvim",
event = "VeryLazy",
opts = {
-- recommended settings
default = {
embed_image_as_base64 = false,
prompt_for_file_name = false,
drag_and_drop = {
insert_mode = true,
},
-- required for Windows users
use_absolute_path = true,
},
},
},
{
-- Make sure to set this up properly if you have lazy=true
"MeanderingProgrammer/render-markdown.nvim",
opts = {
file_types = { "markdown", "Avante" },
},
ft = { "markdown", "Avante" },
},
},
},
{
"folke/edgy.nvim",
event = "VeryLazy",
enabled = false,
opts = require("configs.edgy"),
},
} }