Skip to content

Commit 2028a10

Browse files
committed
feat(nvim): update configs
1 parent de8379a commit 2028a10

9 files changed

Lines changed: 132 additions & 37 deletions

File tree

config/kanata/config.kbd

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
(defcfg
2+
linux-dev /dev/input/by-id/usb-SINO_WEALTH_Gaming_KB-event-kbd
3+
)
4+
5+
(defsrc
6+
grv 1 2 3 4 5 6 7 8 9 0 - = bspc
7+
tab q w e r t y u i o p [ ] \
8+
caps a s d f g h j k l ; ' ret
9+
lsft z x c v b n m , . / rsft
10+
lctl lmet lalt spc ralt menu rctl
11+
)
12+
13+
;; defalias is used to declare a shortcut for a more complicated action to keep
14+
;; the deflayer declarations clean and aligned. The alignment in deflayers is
15+
;; not necessary, but is strongly recommended for ease of understanding visually.
16+
;;
17+
;; Aliases are referred to by `@<alias_name>`.
18+
(defalias
19+
;; when activated, the underlying defsrc key will be the output action
20+
src use-defsrc
21+
22+
;; tap: backtick (grave), hold: switch to arrows layer
23+
grv (tap-hold-press 0 200 grv (layer-while-held arrows))
24+
25+
;; tap: esc, hold: lctl
26+
lctl (tap-hold-press 0 200 esc lctl)
27+
28+
;; holding will press both lsft and switch to caps layer
29+
rsft (multi rsft (layer-while-held caps))
30+
)
31+
32+
;; The first layer defined is the layer that will be active by default when
33+
;; kanata starts up. This layer has modified backtick/grave key (@grv) which is
34+
;; an alias for a tap-hold key. All other keys are the underscore _ which means
35+
;; "transparent". Transparent means the base layer behaviour is used when
36+
;; pressing that key.
37+
(deflayer default
38+
@grv _ _ _ _ _ _ _ _ _ _ _ _ _
39+
_ _ _ _ _ _ _ _ _ _ _ _ _ _
40+
@lctl _ _ _ _ _ _ _ _ _ _ _ _
41+
_ _ _ _ _ _ _ _ _ _ _ @rsft
42+
_ _ _ _ _ _ _
43+
)
44+
45+
;; Map hjkl to arrow keys. The `lrld` action stands for "live reload". This will
46+
;; re-parse everything except for linux-dev, meaning you cannot live reload and
47+
;; switch keyboard devices.
48+
(deflayermap (arrows)
49+
r lrld
50+
h left
51+
j down
52+
k up
53+
l right
54+
)
55+
56+
;; Map esc key from default layer to defsrc assigned key (caps lock)
57+
(deflayermap (caps)
58+
esc caps
59+
)
60+
61+
;; vim:ft=lisp

config/nvim/after/ftplugin/javascriptreact.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
vim.cmd("runtime! ftplugin/javascript.lua")
33

44
-- React directives
5-
vim.cmd.inoreabbrev("uc", '"use client";')
6-
vim.cmd.inoreabbrev("us", '"use server";')
5+
vim.cmd.inoreabbrev("ruc", '"use client";')
6+
vim.cmd.inoreabbrev("rus", '"use server";')

config/nvim/lazy-lock.json

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,59 @@
11
{
22
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
3-
"LuaSnip": { "branch": "master", "commit": "fb525166ccc30296fb3457441eb979113de46b00" },
4-
"alpha-nvim": { "branch": "main", "commit": "a35468cd72645dbd52c0624ceead5f301c566dff" },
3+
"LuaSnip": { "branch": "master", "commit": "831a130291eb6dae0dabd2748d0a99401a2eebc4" },
4+
"alpha-nvim": { "branch": "main", "commit": "2b3cbcdd980cae1e022409289245053f62fb50f6" },
55
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
66
"catppuccin": { "branch": "main", "commit": "fa42eb5e26819ef58884257d5ae95dd0552b9a66" },
77
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
88
"cmp-calc": { "branch": "main", "commit": "5947b412da67306c5b68698a02a846760059be2e" },
99
"cmp-git": { "branch": "main", "commit": "b24309c386c9666c549a1abaedd4956541676d06" },
1010
"cmp-nvim-lsp": { "branch": "main", "commit": "a8912b88ce488f411177fc8aed358b04dc246d7b" },
1111
"cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "031e6ba70b0ad5eee49fd2120ff7a2e325b17fa7" },
12-
"cmp-path": { "branch": "main", "commit": "c6635aae33a50d6010bf1aa756ac2398a2d54c32" },
12+
"cmp-path": { "branch": "main", "commit": "e52e640b7befd8113b3350f46e8cfcfe98fcf730" },
1313
"cmp-spell": { "branch": "master", "commit": "694a4e50809d6d645c1ea29015dad0c293f019d6" },
1414
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
15-
"codecompanion.nvim": { "branch": "main", "commit": "dbefc41dba2f46720ecb6ecec34c0c5f80022f2b" },
16-
"conform.nvim": { "branch": "master", "commit": "8132ec733eed3bf415b97b76797ca41b59f51d7d" },
15+
"codecompanion.nvim": { "branch": "main", "commit": "d067c846d4f7239c6d3524ea3535f459b18dfd99" },
16+
"conform.nvim": { "branch": "master", "commit": "973f3cb73887d510321653044791d7937c7ec0fa" },
1717
"copilot-cmp": { "branch": "master", "commit": "15fc12af3d0109fa76b60b5cffa1373697e261d1" },
18-
"copilot.lua": { "branch": "master", "commit": "c1bb86abbed1a52a11ab3944ef00c8410520543d" },
18+
"copilot.lua": { "branch": "master", "commit": "14bf786180b2ca4578915c56989b6d676dddc6f3" },
1919
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
2020
"fidget.nvim": { "branch": "main", "commit": "d9ba6b7bfe29b3119a610892af67602641da778e" },
2121
"flash.nvim": { "branch": "main", "commit": "3c942666f115e2811e959eabbdd361a025db8b63" },
22-
"gitsigns.nvim": { "branch": "main", "commit": "88205953bd748322b49b26e1dfb0389932520dc9" },
22+
"gitsigns.nvim": { "branch": "main", "commit": "93f882f7041a2e779addbd34943812ca66edef5a" },
2323
"indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" },
24-
"kulala.nvim": { "branch": "main", "commit": "90d80cef3b27fbf8e543a1e8468b2794fd0b13dc" },
24+
"kulala.nvim": { "branch": "main", "commit": "6b6e1c8b538cce6654cfc5fb3e4a3acfa316ce57" },
2525
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
2626
"lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" },
2727
"lualine.nvim": { "branch": "master", "commit": "a94fc68960665e54408fe37dcf573193c4ce82c9" },
2828
"luvit-meta": { "branch": "main", "commit": "1df30b60b1b4aecfebc785aa98943db6c6989716" },
2929
"markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" },
30-
"mason-lspconfig.nvim": { "branch": "main", "commit": "f54e3c11fc9ebfcfc27e696182b0295b071d0811" },
30+
"mason-lspconfig.nvim": { "branch": "main", "commit": "bb3a17efc797c34c054463174e5522442576ebd8" },
3131
"mason.nvim": { "branch": "main", "commit": "8024d64e1330b86044fed4c8494ef3dcd483a67c" },
3232
"neogen": { "branch": "main", "commit": "d7f9461727751fb07f82011051338a9aba07581d" },
33-
"nvim-autopairs": { "branch": "master", "commit": "2647cce4cb64fb35c212146663384e05ae126bdf" },
33+
"neogit": { "branch": "master", "commit": "55410182748755baf5c3944c9825cd082644f1c1" },
34+
"nvim-autopairs": { "branch": "master", "commit": "23320e75953ac82e559c610bec5a90d9c6dfa743" },
3435
"nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" },
35-
"nvim-colorizer.lua": { "branch": "master", "commit": "517df88cf2afb36652830df2c655df2da416a0ae" },
36-
"nvim-lint": { "branch": "master", "commit": "2b0039b8be9583704591a13129c600891ac2c596" },
37-
"nvim-lspconfig": { "branch": "master", "commit": "314b35335cc84bc2a085c84c69da955ba22da163" },
36+
"nvim-colorizer.lua": { "branch": "master", "commit": "8a9b722257b5e6733c340c36f4bd8693e5f47de3" },
37+
"nvim-lint": { "branch": "master", "commit": "9c6207559297b24f0b7c32829f8e45f7d65b991f" },
38+
"nvim-lspconfig": { "branch": "master", "commit": "f47cd681d7cb6048876a2e908b6d8ba1e530d152" },
3839
"nvim-surround": { "branch": "main", "commit": "8dd9150ca7eae5683660ea20cec86edcd5ca4046" },
39-
"nvim-tree.lua": { "branch": "master", "commit": "8eb5e0bfd1c4da6efc03ab0c1ccf463dbaae831e" },
40+
"nvim-tree.lua": { "branch": "master", "commit": "543ed3cac212dc3993ef9f042f6c0812e34ddd43" },
4041
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
4142
"nvim-treesitter-textobjects": { "branch": "master", "commit": "89ebe73cd2836db80a22d9748999ace0241917a5" },
4243
"nvim-ts-context-commentstring": { "branch": "main", "commit": "1b212c2eee76d787bbea6aa5e92a2b534e7b4f8f" },
4344
"nvim-ufo": { "branch": "main", "commit": "80fe8215ba566df2fbf3bf4d25f59ff8f41bc0e1" },
44-
"nvim-vtsls": { "branch": "main", "commit": "60b493e641d3674c030c660cabe7a2a3f7a914be" },
45-
"nvim-web-devicons": { "branch": "master", "commit": "1fb58cca9aebbc4fd32b086cb413548ce132c127" },
45+
"nvim-vtsls": { "branch": "main", "commit": "0b5f73c9e50ce95842ea07bb3f05c7d66d87d14a" },
46+
"nvim-web-devicons": { "branch": "master", "commit": "0422a19d9aa3aad2c7e5cca167e5407b13407a9d" },
47+
"octo.nvim": { "branch": "master", "commit": "8ebbd3055d8011eef1791bcb567e057cb4038b00" },
4648
"persistence.nvim": { "branch": "main", "commit": "166a79a55bfa7a4db3e26fc031b4d92af71d0b51" },
4749
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
4850
"promise-async": { "branch": "main", "commit": "119e8961014c9bfaf1487bf3c2a393d254f337e2" },
49-
"rainbow-delimiters.nvim": { "branch": "master", "commit": "55ad4fb76ab68460f700599b7449385f0c4e858e" },
50-
"schemastore.nvim": { "branch": "main", "commit": "eeacd3cb53a1991a3ef18fb0456c9b9bda047c70" },
51+
"rainbow-delimiters.nvim": { "branch": "master", "commit": "49372aadaaf04d14a50efaa34150c51d5a8047e1" },
52+
"schemastore.nvim": { "branch": "main", "commit": "c957914d75b4a008ce09f4116e57e59fe6e3fae1" },
5153
"telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" },
5254
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
5355
"telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" },
54-
"undotree": { "branch": "master", "commit": "b951b87b46c34356d44aa71886aecf9dd7f5788a" },
55-
"vim-fugitive": { "branch": "master", "commit": "593f831d6f6d779cbabb70a4d1e6b1b1936a88af" },
56+
"undotree": { "branch": "master", "commit": "28f2f54a34baff90ea6f4a735ef1813ad875c743" },
57+
"vim-fugitive": { "branch": "master", "commit": "61b51c09b7c9ce04e821f6cf76ea4f6f903e3cf4" },
5658
"which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" }
5759
}

config/nvim/lua/plugins/colorscheme.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ return {
2525
lsp_trouble = true,
2626
mason = true,
2727
neotest = true,
28+
octo = true,
2829
telescope = { enabled = true, style = "nvchad" },
2930
which_key = true,
3031
},

config/nvim/lua/plugins/conform.lua

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,7 @@ return {
4646
scope = "locally"
4747
end
4848

49-
if not ref.format_on_save then
50-
ref.format_on_save = true
51-
else
52-
ref.format_on_save = false
53-
end
49+
ref.format_on_save = not ref.format_on_save
5450

5551
vim.notify(
5652
string.format(

config/nvim/lua/plugins/git.lua

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,29 @@
11
---@type LazySpec
22
return {
33
{
4-
"tpope/vim-fugitive",
5-
cmd = { "Git", "Gstatus", "Gblame", "Gpush", "Gpull", "G" },
4+
"NeogitOrg/neogit",
5+
cmd = "Neogit",
6+
keys = { { "<leader>gn", "<cmd>Neogit<cr>", desc = "Open Neogit" } },
7+
dependencies = {
8+
"nvim-lua/plenary.nvim",
9+
"sindrets/diffview.nvim",
10+
"nvim-telescope/telescope.nvim",
11+
},
12+
},
13+
14+
---@module "octo"
15+
{
16+
"pwntester/octo.nvim",
17+
cmd = "Octo",
18+
keys = { { "<leader>go", "<cmd>Octo<cr>", desc = "Open Octo" } },
19+
dependencies = {
20+
"nvim-lua/plenary.nvim",
21+
"nvim-telescope/telescope.nvim",
22+
"nvim-tree/nvim-web-devicons",
23+
},
24+
---@type OctoConfig
25+
---@diagnostic disable-next-line: missing-fields
26+
opts = { enable_builtin = true },
627
},
728

829
---@module "diffview"

config/nvim/snippets/luasnippets/javascript.lua

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,20 @@
11
---@diagnostic disable: undefined-global
22
local utils = require("core.utils").string_utils
33

4+
local import_name_node = function(args, prefix, suffix)
5+
local specifier = args[1][1]
6+
local import = utils.to_pascal_case(utils.basename(specifier))
7+
local nodes = {}
8+
if prefix then
9+
table.insert(nodes, t(prefix))
10+
end
11+
table.insert(nodes, i(1, import))
12+
if suffix then
13+
table.insert(nodes, t(suffix))
14+
end
15+
return sn(nil, nodes)
16+
end
17+
418
return {
519
-- c-style for loop
620
s(
@@ -29,13 +43,13 @@ return {
2943
{ trig = "import", name = "Import Name" },
3044
fmt('import {} from "{}";', {
3145
c(2, {
46+
d(nil, import_name_node, { 1 }),
47+
d(nil, function(args)
48+
return import_name_node(args, "{ ", " }")
49+
end, { 1 }),
3250
d(nil, function(args)
33-
local specifier = args[1][1]
34-
local import = utils.to_pascal_case(utils.basename(specifier))
35-
return sn(nil, { i(1, import) })
51+
return import_name_node(args, "* as ")
3652
end, { 1 }),
37-
sn(nil, { t("{ "), i(1, "named import"), t(" }") }),
38-
sn(nil, { t("* as "), i(1, "namespace import") }),
3953
}),
4054
i(1, "specifier"),
4155
})

config/zsh/.zshenv

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
export ZDOTDIR=$HOME/.config/zsh
33

44
# Set lang
5-
export LC_ALL=en_US.UTF-8
6-
export LANG=en_US.UTF-8
5+
export LC_ALL=en_IN.UTF-8
6+
export LANG=en_IN.UTF-8
77

88
case "$OSTYPE" in
99
darwin*) export IS_MAC=true ;;

config/zsh/plugins.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ github = 'zsh-users/zsh-history-substring-search'
3232
# Better (customisable) syntax highlighting for ZSH
3333
[plugins.fast-syntax-highlighting]
3434
github = 'zdharma-continuum/fast-syntax-highlighting'
35-
apply = ["defer"]
35+
# apply = ["defer"] # defering causes issues with `forward-word`
3636

3737
# ZSH plugin that reminds you to use existing aliases
3838
[plugins.zsh-you-should-use]

0 commit comments

Comments
 (0)