Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
Dotfiles for sync across computers

Managed by GNU `stow`.

----

**MacOs**
Expand Down
9 changes: 3 additions & 6 deletions docs/zshrc.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

Utilities for shell (using ohmyzsh)

Now use fnm instead nvm, for faster boot new session

```bash
# to run profile cmd:
# time ZSH_DEBUGRC=1 zsh -i -c exit
Expand All @@ -12,7 +14,6 @@ fi
# config dir
export XDG_CONFIG_HOME="$HOME/.config"
# enable when nvm dir is not under root/custom dir location
# export NVM_DIR=""

# Aliasing
alias ovim="vim"
Expand Down Expand Up @@ -44,14 +45,10 @@ function y() {
ZSH_THEME="robbyrussell"

# plugins
plugins=(git nvm)
plugins=(git)

# nvm plugin config
zstyle ':omz:plugins:nvm' lazy yes
zstyle ':omz:plugins:nvm' lazy-cmd eslint prettier typescript nvm

# source omz

if [ -n "${ZSH_DEBUGRC+1}" ]; then
zprof
fi
Expand Down
2 changes: 1 addition & 1 deletion ghostty/.config/ghostty/config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ===== ui
theme = kanso-zen
theme = Rose Pine
font-size = 17.5
macos-titlebar-proxy-icon = hidden
macos-non-native-fullscreen = true
Expand Down
4 changes: 3 additions & 1 deletion nvim/.config/nvim/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ test.sh
.luarc.json
nvim

./lua/custom/plugins/codeverse.lua
# this is my corp internal
trae.lua
internal_ai.lua
5 changes: 5 additions & 0 deletions nvim/.config/nvim/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
vim.g.mapleader = ' '
vim.g.maplocalleader = ' '

-- trae stuff
vim.g.trae_disable_autocompletion = true
vim.g.trae_no_map_tab = true
vim.g.trae_disable_bindings = true

-- [[ Install `lazy.nvim` plugin manager ]]
-- https://github.com/folke/lazy.nvim
-- `:help lazy.nvim.txt` for more info
Expand Down
48 changes: 27 additions & 21 deletions nvim/.config/nvim/lazy-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,37 @@
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
"arrow.nvim": { "branch": "master", "commit": "6e0f726f55f99332dd726a53effd6813786b6d49" },
"bigfile.nvim": { "branch": "main", "commit": "33eb067e3d7029ac77e081cfe7c45361887a311a" },
"blink.cmp": { "branch": "main", "commit": "bae4bae0eedd1fa55f34b685862e94a222d5c6f8" },
"blink.cmp": { "branch": "main", "commit": "327fff91fe6af358e990be7be1ec8b78037d2138" },
"blink.compat": { "branch": "main", "commit": "2ed6d9a28b07fa6f3bface818470605f8896408c" },
"blink.indent": { "branch": "main", "commit": "63275b3b0df71047514613353294f02dae510bfc" },
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
"code_runner.nvim": { "branch": "main", "commit": "65c8d11f507073b915f10faa88ea05bd4fbf69ce" },
"conform.nvim": { "branch": "master", "commit": "973f3cb73887d510321653044791d7937c7ec0fa" },
"code_runner.nvim": { "branch": "main", "commit": "45dfea066a6110abcbc3cd361457ac3cbaefd68b" },
"conform.nvim": { "branch": "master", "commit": "cde4da5c1083d3527776fee69536107d98dae6c9" },
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
"fidget.nvim": { "branch": "main", "commit": "4ec7bed6c86b671ddde03ca1b227343cfa3e65fa" },
"fidget.nvim": { "branch": "main", "commit": "e32b672d8fd343f9d6a76944fedb8c61d7d8111a" },
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
"fzf-lua": { "branch": "main", "commit": "4ee42b241e57b77b4f3c61a018f496219f246901" },
"grug-far.nvim": { "branch": "main", "commit": "385d1949dc21d0c39e7a74b4f4a25da18817bc86" },
"indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" },
"kanso.nvim": { "branch": "main", "commit": "22ba950771e86b972edf0047a0d74d8f9950b712" },
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
"lualine.nvim": { "branch": "master", "commit": "a94fc68960665e54408fe37dcf573193c4ce82c9" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "7f0bf635082bb9b7d2b37766054526a6ccafdb85" },
"mason.nvim": { "branch": "main", "commit": "9e25c98d4826998460926f8c5c2284848d80ae89" },
"nvim-lspconfig": { "branch": "master", "commit": "9141be4c1332afc83bdf1b0278dbb030f75ff8e3" },
"fzf-lua": { "branch": "main", "commit": "ce40b36a14f4eaf89c4aad10b01a83df13d624be" },
"grug-far.nvim": { "branch": "main", "commit": "b58b2d65863f4ebad88b10a1ddd519e5380466e0" },
"lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" },
"lazydev.nvim": { "branch": "main", "commit": "5231c62aa83c2f8dc8e7ba957aa77098cda1257d" },
"lualine.nvim": { "branch": "master", "commit": "3946f0122255bc377d14a59b27b609fb3ab25768" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "b1d9a914b02ba5660f1e272a03314b31d4576fe2" },
"mason.nvim": { "branch": "main", "commit": "ad7146aa61dcaeb54fa900144d768f040090bff0" },
"nvim-autopairs": { "branch": "master", "commit": "7a2c97cccd60abc559344042fefb1d5a85b3e33b" },
"nvim-lspconfig": { "branch": "master", "commit": "b34fbdffdcb6295c7a25df6ba375452a2e73c32e" },
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
"nvim-treesitter-context": { "branch": "master", "commit": "dca8726fea2c14e1ce6adbaa76a04816fbfaff61" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "71385f191ec06ffc60e80e6b0c9a9d5daed4824c" },
"oil.nvim": { "branch": "master", "commit": "bbad9a76b2617ce1221d49619e4e4b659b3c61fc" },
"outline.nvim": { "branch": "main", "commit": "0eb9289ab39c91caf8b3ed0e3a17764809d69558" },
"scratch.nvim": { "branch": "main", "commit": "0e3ee1fe64023efe9459a361401a48017d34349e" },
"trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" },
"undotree": { "branch": "master", "commit": "28f2f54a34baff90ea6f4a735ef1813ad875c743" },
"nvim-treesitter-context": { "branch": "master", "commit": "660861b1849256398f70450afdf93908d28dc945" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "5ca4aaa6efdcc59be46b95a3e876300cfead05ef" },
"nvim-ts-autotag": { "branch": "main", "commit": "c4ca798ab95b316a768d51eaaaee48f64a4a46bc" },
"oil.nvim": { "branch": "master", "commit": "7e1cd7703ff2924d7038476dcbc04b950203b902" },
"outline.nvim": { "branch": "main", "commit": "6b62f73a6bf317531d15a7ae1b724e85485d8148" },
"rose-pine": { "branch": "main", "commit": "cf2a288696b03d0934da713d66c6d71557b5c997" },
"scratch.nvim": { "branch": "main", "commit": "1e78854fd3140411b231d5b6f9b3559b1ba5de77" },
"sidekick.nvim": { "branch": "main", "commit": "c2bdf8cfcd87a6be5f8b84322c1b5052e78e302e" },
"toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" },
"trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" },
"undotree": { "branch": "master", "commit": "0f1c9816975b5d7f87d5003a19c53c6fd2ff6f7f" },
"vim-fugitive": { "branch": "master", "commit": "61b51c09b7c9ce04e821f6cf76ea4f6f903e3cf4" },
"vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" },
"which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" }
"which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" }
}
Empty file.
68 changes: 68 additions & 0 deletions nvim/.config/nvim/lua/custom/plugins/ai.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
local exist, internal_ai_tools = pcall(require, 'config.internal_ai')
local ai_tools = {}

if exist then
for k, value in pairs(internal_ai_tools) do
ai_tools[k] = value
end
end

return {
"folke/sidekick.nvim",
opts = {
cli = {
tools = ai_tools
}
},
keys = {
{
"<tab>",
function()
-- if there is a next edit, jump to it, otherwise apply it if any
if not require("sidekick").nes_jump_or_apply() then
return "<Tab>" -- fallback to normal tab
end
end,
expr = true,
desc = "Goto/Apply Next Edit Suggestion",
},
{
"<leader>aa",
function() require("sidekick.cli").toggle() end,
desc = "Sidekick Toggle CLI",
},
{
"<leader>as",
function() require("sidekick.cli").select({ filter = { installed = true } }) end,
desc = "Select CLI",
},
{
"<leader>ad",
function() require("sidekick.cli").close() end,
desc = "Detach a CLI Session",
},
{
"<leader>at",
function() require("sidekick.cli").send({ msg = "{this}" }) end,
mode = { "x", "n" },
desc = "Send This",
},
{
"<leader>af",
function() require("sidekick.cli").send({ msg = "{file}" }) end,
desc = "Send File",
},
{
"<leader>av",
function() require("sidekick.cli").send({ msg = "{selection}" }) end,
mode = { "x" },
desc = "Send Visual Selection",
},
{
"<leader>ap",
function() require("sidekick.cli").prompt() end,
mode = { "n", "x" },
desc = "Sidekick Select Prompt",
},
},
}
5 changes: 5 additions & 0 deletions nvim/.config/nvim/lua/custom/plugins/autopair.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
return {
'windwp/nvim-autopairs',
event = "InsertEnter",
config = true
}
17 changes: 6 additions & 11 deletions nvim/.config/nvim/lua/custom/plugins/colorscheme.lua
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
return {
{
"webhooked/kanso.nvim",
lazy = false,
priority = 1000,
config = function()
require('kanso').setup {
transparent = true
}
vim.cmd('colorscheme kanso-zen')
end,
}
"rose-pine/neovim",
name = "rose-pine",
config = function()
require("rose-pine").setup {}
vim.cmd("colorscheme rose-pine-main")
end
}
125 changes: 71 additions & 54 deletions nvim/.config/nvim/lua/custom/plugins/completion.lua
Original file line number Diff line number Diff line change
@@ -1,62 +1,79 @@
return {
'saghen/blink.cmp',
lazy = false, -- lazy loading handled internally
-- optional: provides snippets for the snippet source
dependencies = 'rafamadriz/friendly-snippets',
-- use a release tag to download pre-built binaries
version = '1.*',
-- OR build from source, requires nightly: https://rust-lang.github.io/rustup/concepts/channels.html#working-with-nightly-rust
-- build = 'cargo build --release',
-- If you use nix, you can build from source using latest nightly rust with:
-- build = 'nix run .#build-plugin',
---@module 'blink.cmp'
---@type blink.cmp.Config
opts = {
-- 'default' for mappings similar to built-in completion
-- 'super-tab' for mappings similar to vscode (tab to accept, arrow keys to navigate)
-- 'enter' for mappings similar to 'super-tab' but with 'enter' to accept
-- see the "default configuration" section below for full documentation on how to define
-- your own keymap.
keymap = { preset = 'super-tab' },
signature = { enabled = true },
appearance = {
-- Sets the fallback highlight groups to nvim-cmp's highlight groups
-- Useful for when your theme doesn't support blink.cmp
-- will be removed in a future release
use_nvim_cmp_as_default = false,
-- Set to 'mono' for 'Nerd Font Mono' or 'normal' for 'Nerd Font'
-- Adjusts spacing to ensure icons are aligned
nerd_font_variant = 'mono',
{
'saghen/blink.compat',
-- use v2.* for blink.cmp v1.*
version = '2.*',
-- lazy.nvim will automatically load the plugin when it's required by blink.cmp
lazy = true,
-- make sure to set opts so that lazy.nvim calls blink.compat's setup
opts = {},
},
{
'saghen/blink.cmp',
lazy = false, -- lazy loading handled internally
-- optional: provides snippets for the snippet source
dependencies = {
'rafamadriz/friendly-snippets',
'folke/lazydev.nvim',
},
completion = {
menu = {
border = 'rounded',
draw = {
columns = { { 'label', 'label_description', gap = 1 }, { 'kind', "source_name", gap = 1 } },
},
-- use a release tag to download pre-built binaries
version = '1.*',
-- OR build from source, requires nightly: https://rust-lang.github.io/rustup/concepts/channels.html#working-with-nightly-rust
-- build = 'cargo build --release',
-- If you use nix, you can build from source using latest nightly rust with:
-- build = 'nix run .#build-plugin',
---@module 'blink.cmp'
---@type blink.cmp.Config
opts = {
-- 'default' for mappings similar to built-in completion
-- 'super-tab' for mappings similar to vscode (tab to accept, arrow keys to navigate)
-- 'enter' for mappings similar to 'super-tab' but with 'enter' to accept
-- see the "default configuration" section below for full documentation on how to define
-- your own keymap.
keymap = { preset = 'super-tab' },
signature = { enabled = true },
appearance = {
nerd_font_variant = 'mono',
},
accept = {
auto_brackets = {
enabled = false,
completion = {
menu = {
border = 'rounded',
draw = {
columns = { { 'label', 'label_description', gap = 1 }, { 'kind', "source_name", gap = 1 } },
},
},
accept = {
auto_brackets = {
enabled = false,
},
},
documentation = {
auto_show = true,
window = { border = 'rounded' },
},
},
documentation = {
auto_show = true,
window = { border = 'rounded' },
-- default list of enabled providers defined so that you can extend it
-- elsewhere in your config, without redefining it, via `opts_extend`
sources = {
default = { 'lsp', 'path', 'snippets', 'buffer', 'lazydev', 'trae' },
providers = {
lazydev = { module = 'lazydev.integrations.blink', score_offset = 100 },
trae = {
name = 'trae',
module = 'blink.compat.source',
opts = {},
async = true
},
},
-- optionally disable cmdline completions
-- cmdline = {},
},
fuzzy = { implementation = "prefer_rust_with_warning" }
-- experimental signature help support
-- signature = { enabled = true }
},
-- default list of enabled providers defined so that you can extend it
-- elsewhere in your config, without redefining it, via `opts_extend`
sources = {
default = { 'lsp', 'path', 'snippets', 'buffer' },
-- optionally disable cmdline completions
-- cmdline = {},
},
fuzzy = { implementation = "prefer_rust_with_warning" }
-- experimental signature help support
-- signature = { enabled = true }
},
-- allows extending the providers array elsewhere in your config
-- without having to redefine it
opts_extend = { 'sources.default' },
-- allows extending the providers array elsewhere in your config
-- without having to redefine it
opts_extend = { 'sources.default' },
}
}
5 changes: 1 addition & 4 deletions nvim/.config/nvim/lua/custom/plugins/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,8 @@ return {
{ 'tpope/vim-sleuth', event = 'VeryLazy' },
-- Add indentation guides even on blank lines
{
'lukas-reineke/indent-blankline.nvim',
'saghen/blink.indent',
event = 'VeryLazy',
-- Enable `lukas-reineke/indent-blankline.nvim`
-- See `:help ibl`
main = 'ibl',
opts = {},
},
-- "gc" to comment visual regions/lines
Expand Down
Loading