Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Device/mac #46

Merged
merged 4 commits into from
May 27, 2024
Merged
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: 1 addition & 0 deletions dot_config/homebrew/Brewfile
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,4 @@ cask "powershell"
cask "unity-hub"
cask "visual-studio-code"
cask "wezterm"
cask "chatgpt"
42 changes: 22 additions & 20 deletions dot_config/nvim/lazy-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,52 +5,54 @@
"catppuccin": { "branch": "main", "commit": "d97387aea8264f484bb5d5e74f2182a06c83e0d8" },
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"diffview.nvim": { "branch": "main", "commit": "010766cf15238d81f6fd8a6f3189010a62569557" },
"diffview.nvim": { "branch": "main", "commit": "1ec7b56b959dab18f7030f541c33ae60e18a6f88" },
"fidget.nvim": { "branch": "main", "commit": "0ba1e16d07627532b6cae915cc992ecac249fb97" },
"gitsigns.nvim": { "branch": "main", "commit": "805610a9393fa231f2c2b49cb521bfa413fadb3d" },
"go.nvim": { "branch": "master", "commit": "294d65c93514f14fbbe8af0545ab8918d939acdb" },
"gitsigns.nvim": { "branch": "main", "commit": "cdfcd9d39d23c46ae9a040de2c6a8b8bf868746e" },
"go.nvim": { "branch": "master", "commit": "1423d5d0820eeefc97d6cdaf3ae8b554676619cc" },
"guihua.lua": { "branch": "master", "commit": "5b45e29629eb1136c82870a5ebe55747ffebe79b" },
"hlchunk.nvim": { "branch": "main", "commit": "882d1bc86d459fa8884398223c841fd09ea61b6b" },
"hlchunk.nvim": { "branch": "main", "commit": "2f25e09d2d0a2c121225a46e8cfe3ff11225ac79" },
"im-select.nvim": { "branch": "master", "commit": "ca1aebb8f5c8a0342ae99a0fcc8ebc49b5f2201e" },
"lazy.nvim": { "branch": "main", "commit": "8f19915175395680808de529e4220da8dafc0759" },
"leap.nvim": { "branch": "main", "commit": "8f4d3ab9fe5c906c5745150191831c5ee0a427a0" },
"lsp-lens.nvim": { "branch": "main", "commit": "48bb1a7e271424c15f3d588d54adc9b7c319d977" },
"lsp-zero.nvim": { "branch": "v2.x", "commit": "9a686513eaaa13d737d0fec8956a18268ead8b29" },
"lsp_signature.nvim": { "branch": "master", "commit": "3cc161d4e584254a7a21050734ef07cd59bbb5d8" },
"lspsaga.nvim": { "branch": "main", "commit": "234d8a0a411d43d5f265ef6c40eebf233e453aa2" },
"lsp_signature.nvim": { "branch": "master", "commit": "43729353dec224fa620a877639b8b0744112b286" },
"lspsaga.nvim": { "branch": "main", "commit": "0e2e116ade87034b2983ba0d5460af731fb1fc28" },
"lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "a4caa0d083aab56f6cd5acf2d42331b74614a585" },
"mason-null-ls.nvim": { "branch": "main", "commit": "de19726de7260c68d94691afb057fa73d3cc53e7" },
"mason.nvim": { "branch": "main", "commit": "49ff59aded1047a773670651cfa40e76e63c6377" },
"mini.indentscope": { "branch": "main", "commit": "cf07f19e718ebb0bcc5b00999083ce11c37b8d40" },
"none-ls.nvim": { "branch": "main", "commit": "37671797d6e5f9bd0ee3ab965ab2e6de251e1930" },
"none-ls.nvim": { "branch": "main", "commit": "60f5f80686f5a272ed3281a7d4962cb54dc5348e" },
"nvim-autopairs": { "branch": "master", "commit": "c15de7e7981f1111642e7e53799e1211d4606cb9" },
"nvim-cmp": { "branch": "main", "commit": "5260e5e8ecadaf13e6b82cf867a909f54e15fd07" },
"nvim-dap": { "branch": "master", "commit": "5a2f7121869394502521c52b2bc581ab22c69447" },
"nvim-dap": { "branch": "master", "commit": "c65c163daa47e0623dd85d2303fce0c22e52ad01" },
"nvim-dap-ui": { "branch": "master", "commit": "334cf3038c4756e6ab999cbac67c847fb654c190" },
"nvim-dap-virtual-text": { "branch": "master", "commit": "3e8e207513e6ef520894950acd76b79902714103" },
"nvim-lspconfig": { "branch": "master", "commit": "eadcee1573ca9d0e0cd36a49f620186a8dfdc607" },
"nvim-nio": { "branch": "master", "commit": "8765cbc4d0c629c8158a5341e1b4305fd93c3a90" },
"nvim-dap-virtual-text": { "branch": "master", "commit": "d7c695ea39542f6da94ee4d66176f5d660ab0a77" },
"nvim-lspconfig": { "branch": "master", "commit": "b972e7154bc94ab4ecdbb38c8edbccac36f83996" },
"nvim-nio": { "branch": "master", "commit": "632024157d01e8bc48fd7df6a7de8ffe3fdd4f3a" },
"nvim-spectre": { "branch": "master", "commit": "5690ea46baf08bbc1623980012e14b6239ce582e" },
"nvim-tree.lua": { "branch": "master", "commit": "2bc725a3ebc23f0172fb0ab4d1134b81bcc13812" },
"nvim-treesitter": { "branch": "master", "commit": "30de5e7e9486fb1b1b8c2a1e71052b13f94f1cb0" },
"nvim-web-devicons": { "branch": "master", "commit": "e37bb1feee9e7320c76050a55443fa843b4b6f83" },
"nvim-tree.lua": { "branch": "master", "commit": "4c8ddee4539052f8e94c907c4e02a3ffd2511ea4" },
"nvim-treesitter": { "branch": "master", "commit": "6d56c5f404d3b116bab167bc03993cfb0a83f8aa" },
"nvim-web-devicons": { "branch": "master", "commit": "b77921fdc44833c994fdb389d658ccbce5490c16" },
"plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" },
"render-markdown": { "branch": "main", "commit": "49f45978fbb8fcf874f3b6967db4a6ea647df04b" },
"rustaceanvim": { "branch": "master", "commit": "66466d4fe0b8988ba9e2932d3c41782c2efb683b" },
"render-markdown": { "branch": "main", "commit": "43bbefd410333a04baf62ddfa8bb2a2d30a1bbc1" },
"rustaceanvim": { "branch": "master", "commit": "e306c742bd7f7183e371cd91268b72d9db1bbae0" },
"smart-open.nvim": { "branch": "0.2.x", "commit": "87626ee8748b9bba22093adec7bb58c63e7214f0" },
"sqlite.lua": { "branch": "master", "commit": "d0ffd703b56d090d213b497ed4eb840495f14a11" },
"ssr.nvim": { "branch": "main", "commit": "bb323ba621ac647b4ac5638b47666e3ef3c279e1" },
"telescope-all-recent.nvim": { "branch": "main", "commit": "267e9e5fd13a6e9a4cc6ffe00452d446d040401d" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "9ef21b2e6bb6ebeaf349a0781745549bbb870d27" },
"telescope.nvim": { "branch": "master", "commit": "4aed63995a69e343b068c7469491a8d1592c339f" },
"todo-comments.nvim": { "branch": "main", "commit": "a7e39ae9e74f2c8c6dc4eea6d40c3971ae84752d" },
"telescope-fzy-native.nvim": { "branch": "master", "commit": "282f069504515eec762ab6d6c89903377252bf5b" },
"telescope.nvim": { "branch": "master", "commit": "c2ce039188e22288449e43b77710036e69a45a70" },
"todo-comments.nvim": { "branch": "main", "commit": "e1549807066947818113a7d7ed48f637e49620d3" },
"toggleterm.nvim": { "branch": "main", "commit": "fee58a0473fd92b28c34f8f724e4918b15ba30a3" },
"treesj": { "branch": "main", "commit": "e1e82ab4237619d342c7102c9f13d4b9833bfd39" },
"trouble.nvim": { "branch": "main", "commit": "a8264a65a0b894832ea642844f5b7c30112c458f" },
"vim-fugitive": { "branch": "master", "commit": "4f59455d2388e113bd510e85b310d15b9228ca0d" },
"vim-maximizer": { "branch": "master", "commit": "2e54952fe91e140a2e69f35f22131219fcd9c5f1" },
"vim-repeat": { "branch": "master", "commit": "24afe922e6a05891756ecf331f39a1f6743d3d5a" },
"vim-rhubarb": { "branch": "master", "commit": "ee69335de176d9325267b0fd2597a22901d927b1" },
"vimdoc-ja": { "branch": "master", "commit": "4506db77cb8fbb1939dd0cc4e6bac57ebf29c949" },
"vimdoc-ja": { "branch": "master", "commit": "a7416a00b512a304d5a2ca44a0cdf49413ecbe89" },
"which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" },
"winresizer": { "branch": "master", "commit": "9bd559a03ccec98a458e60c705547119eb5350f3" }
}
64 changes: 32 additions & 32 deletions dot_config/nvim/lua/core/executable_keymaps.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
-- Set <space> as the leader key
-- See `:help mapleader`
-- NOTE: Must happen before plugins are required (otherwise wrong leader will be used)
vim.g.mapleader = ' '
vim.g.maplocalleader = ' '
vim.g.mapleader = " "
vim.g.maplocalleader = " "

local opts = { noremap = true }

Expand All @@ -17,48 +17,48 @@ local opts = { noremap = true }
-- command_mode = "c",

-- for US keyboard
vim.keymap.set('n', ';', ':', opts)
vim.keymap.set('n', ':', ';', opts)
vim.keymap.set("n", ";", ":", opts)
vim.keymap.set("n", ":", ";", opts)

vim.keymap.set({ 'n', 'v' }, '<Leader>v', '<C-v>', opts)
vim.keymap.set({ "n", "v" }, "<Leader>v", "<C-v>", opts)

-- Move to the end of the line
vim.keymap.set('n', '<Leader>h', '^', opts)
vim.keymap.set('n', '<Leader>l', '$', opts)
vim.keymap.set("n", "<Leader>h", "^", opts)
vim.keymap.set("n", "<Leader>l", "$", opts)

-- Split buffer
vim.keymap.set('n', 'ss', ':split<Return><C-w>w', opts)
vim.keymap.set('n', 'sv', ':vsplit<Return><C-w>w', opts)
vim.keymap.set("n", "ss", ":split<Return><C-w>w", opts)
vim.keymap.set("n", "sv", ":vsplit<Return><C-w>w", opts)

-- Move buffer
vim.keymap.set('n', 'sh', '<C-w>h', opts)
vim.keymap.set('n', 'sj', '<C-w>j', opts)
vim.keymap.set('n', 'sk', '<C-w>k', opts)
vim.keymap.set('n', 'sl', '<C-w>l', opts)
vim.keymap.set('n', 's+', '2<C-w>+', opts)
vim.keymap.set('n', 's-', '2<C-w>-', opts)
vim.keymap.set('n', 's=', '<C-w>=', opts)
vim.keymap.set('n', 's<', '5<C-w><', opts)
vim.keymap.set('n', 's>', '5<C-w>>', opts)
vim.keymap.set("n", "sh", "<C-w>h", opts)
vim.keymap.set("n", "sj", "<C-w>j", opts)
vim.keymap.set("n", "sk", "<C-w>k", opts)
vim.keymap.set("n", "sl", "<C-w>l", opts)
vim.keymap.set("n", "s+", "2<C-w>+", opts)
vim.keymap.set("n", "s-", "2<C-w>-", opts)
vim.keymap.set("n", "s=", "<C-w>=", opts)
vim.keymap.set("n", "s<", "5<C-w><", opts)
vim.keymap.set("n", "s>", "5<C-w>>", opts)

-- Select all
vim.keymap.set('n', '<C-a>', 'gg<S-v>G', opts)
vim.keymap.set("n", "<C-a>", "gg<S-v>G", opts)

-- No yank with x
vim.keymap.set('n', 'x', '"_x', opts)
vim.keymap.set("n", "x", '"_x', opts)

-- Insert Mode
vim.keymap.set('i', 'jj', '<ESC>', opts)
vim.keymap.set('i', '<C-b>', '<BS>', opts)
vim.keymap.set('i', '<C-d>', '<Del>', opts)
vim.keymap.set('i', '<C-h>', '<Left>', opts)
vim.keymap.set('i', '<C-j>', '<Down>', opts)
vim.keymap.set('i', '<C-k>', '<Up>', opts)
vim.keymap.set('i', '<C-l>', '<Right>', opts)
vim.keymap.set("i", "jj", "<ESC>", opts)
vim.keymap.set("i", "<C-b>", "<BS>", opts)
vim.keymap.set("i", "<C-d>", "<Del>", opts)
vim.keymap.set("i", "<C-h>", "<Left>", opts)
vim.keymap.set("i", "<C-j>", "<Down>", opts)
vim.keymap.set("i", "<C-k>", "<Up>", opts)
vim.keymap.set("i", "<C-l>", "<Right>", opts)

-- Visual Mode
vim.keymap.set({ 'v', 'x' }, 'v', '<ESC>', opts)
vim.keymap.set({ 'v', 'x' }, '<Leader>h', '^', opts)
vim.keymap.set({ 'v', 'x' }, '<Leader>l', '$h', opts)
vim.keymap.set('v', '>', '>gv', opts)
vim.keymap.set('v', '<', '<gv', opts)
vim.keymap.set({ "v", "x" }, "v", "<ESC>", opts)
vim.keymap.set({ "v", "x" }, "<Leader>h", "^", opts)
vim.keymap.set({ "v", "x" }, "<Leader>l", "$h", opts)
vim.keymap.set("v", ">", ">gv", opts)
vim.keymap.set("v", "<", "<gv", opts)
38 changes: 19 additions & 19 deletions dot_config/nvim/lua/core/executable_lazyvim.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,29 @@
-- `:help lazy.nvim.txt` for more info
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
})
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)

local lazyOpts = {
defaults = {
lazy = true,
},
performance = {
cache = {
enabled = true,
},
},
change_detection = {
notify = false,
},
defaults = {
lazy = true,
},
performance = {
cache = {
enabled = true,
},
},
change_detection = {
notify = false,
},
}

-- Any lua file in ~/.config/nvim/lua/plugins/*.lua will be automatically merged in the main plugin spec
Expand Down
5 changes: 1 addition & 4 deletions dot_config/nvim/lua/plugins/executable_alpha.lua
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,6 @@ end
return {
"goolord/alpha-nvim",
event = "VimEnter",
cond = function()
return not vim.g.vscode
end,
dependencies = { "nvim-tree/nvim-web-devicons" },
config = function()
local present, alpha = pcall(require, "alpha")
Expand Down Expand Up @@ -144,7 +141,7 @@ return {
local buttons = {
type = "group",
val = {
button("f", "󰱼 Search", ":Telescope find_files<CR>"),
button("f", "󰱼 Search", ":Telescope smart_open<CR>"),
button("e", " New", ":ene<CR>"),
-- button("b", " Jump to bookmarks", ":Telescope marks<CR>"),
button("c", " Config", ":e $HOME/.config/nvim/init.lua | :cd %:p:h | :silent !pwd<CR>"),
Expand Down
30 changes: 13 additions & 17 deletions dot_config/nvim/lua/plugins/executable_gitssigns.lua
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
return {
-- Adds git releated signs to the gutter, as well as utilities for managing changes
'lewis6991/gitsigns.nvim',
event = { "BufReadPre", "BufNewFile" },
cond = function()
return not vim.g.vscode
end,
opts = {
-- See `:help gitsigns.txt`
signs = {
add = { text = '┆' },
change = { text = '┆' },
delete = { text = "" },
topdelete = { text = "" },
changedelete = { text = '~' },
untracked = { text = '┆' },
},
},
"lewis6991/gitsigns.nvim",
event = { "BufReadPre", "BufNewFile" },
opts = {
-- See `:help gitsigns.txt`
signs = {
add = { text = "┆" },
change = { text = "┆" },
delete = { text = "" },
topdelete = { text = "" },
changedelete = { text = "~" },
untracked = { text = "┆" },
},
},
}
62 changes: 62 additions & 0 deletions dot_config/nvim/lua/plugins/executable_lsp-zero.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,58 @@
return {
-- Autocompletion
{
"L3MON4D3/LuaSnip",
version = "v2.*",
build = "make install_jsregexp",
config = function()
require("luasnip.loaders.from_vscode").lazy_load()
end,
},

{
"hrsh7th/nvim-cmp",
lazy = true,
event = "InsertEnter",
dependencies = {
{ "hrsh7th/cmp-path" },
{ "L3MON4D3/LuaSnip" },
},
config = function()
-- Here is where you configure the autocompletion settings.
-- The arguments for .extend() have the same shape as `manage_nvim_cmp`:
-- https://github.com/VonHeikemen/lsp-zero.nvim/blob/v2.x/doc/md/api-reference.md#manage_nvim_cmp

require("lsp-zero.cmp").extend()

-- And you can configure cmp even more, if you want to.
local cmp = require("cmp")
local cmp_action = require("lsp-zero.cmp").action()

cmp.setup({
window = {
completion = cmp.config.window.bordered(),
documentation = cmp.config.window.bordered(),
},
mapping = {
["<CR>"] = cmp.mapping.confirm({ select = true }),
["<C-Space>"] = cmp.mapping.complete(),
["<C-f>"] = cmp_action.luasnip_jump_forward(),
["<C-b>"] = cmp_action.luasnip_jump_backward(),
},
completion = {
completeopt = "menu,menuone,preview,noselect",
},
formatting = {
fields = { "abbr", "kind", "menu" },
},
})

-- If you want insert `(` after select function or method item
local cmp_autopairs = require("nvim-autopairs.completion.cmp")
cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done())
end,
},

-- LSP
{
"VonHeikemen/lsp-zero.nvim",
Expand Down Expand Up @@ -128,6 +182,14 @@ return {
},
})

require("lspconfig").lua_ls.setup({
settings = {
diagnostics = {
globals = { "vim" },
},
},
})

-- (Optional) Configure lua language server for neovim
require("lspconfig").gopls.setup({
on_attach = function(client, bufnr)
Expand Down
Loading
Loading