feat: Add completion and remove Copilot
This commit is contained in:
5
dependencies/homebrew.txt
vendored
5
dependencies/homebrew.txt
vendored
@@ -1,11 +1,16 @@
|
|||||||
|
fd
|
||||||
fzf
|
fzf
|
||||||
gh
|
gh
|
||||||
git
|
git
|
||||||
gnupg
|
gnupg
|
||||||
|
golang
|
||||||
nodenv
|
nodenv
|
||||||
|
nodenv/nodenv/nodenv-default-packages
|
||||||
pinentry-mac
|
pinentry-mac
|
||||||
rbenv
|
rbenv
|
||||||
ruby-build
|
ruby-build
|
||||||
|
rust
|
||||||
|
rust-analyzer
|
||||||
stow
|
stow
|
||||||
tmux
|
tmux
|
||||||
wget
|
wget
|
||||||
|
|||||||
2
nodenv/.config/nodenv/default-packages
Normal file
2
nodenv/.config/nodenv/default-packages
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
@angular/language-server
|
||||||
|
typescript-language-server
|
||||||
@@ -1,26 +1,39 @@
|
|||||||
{
|
{
|
||||||
|
"LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" },
|
||||||
"cloak.nvim": { "branch": "main", "commit": "6e5bcd50bebc5cdb7cd3a00eb3d97ab7c4cc3b94" },
|
"cloak.nvim": { "branch": "main", "commit": "6e5bcd50bebc5cdb7cd3a00eb3d97ab7c4cc3b94" },
|
||||||
"copilot.vim": { "branch": "release", "commit": "9484e35cf222e9360e05450622a884f95c662c4c" },
|
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
||||||
|
"cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" },
|
||||||
|
"cmp-dotenv": { "branch": "main", "commit": "fd78929551010bc20602e7e663e42a5e14d76c96" },
|
||||||
|
"cmp-emoji": { "branch": "main", "commit": "e8398e2adf512a03bb4e1728ca017ffeac670a9f" },
|
||||||
|
"cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" },
|
||||||
|
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||||
|
"cmp-rpncalc": { "branch": "master", "commit": "f5f12d2684015bf1d0402b118dc633fef312c16c" },
|
||||||
|
"cmp-tmux": { "branch": "main", "commit": "95b1b921802e6f60627b3e76afb9380fddd87f9a" },
|
||||||
|
"cmp-zsh": { "branch": "main", "commit": "c24db8e58fac9006ec23d93f236749288d00dec9" },
|
||||||
|
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
|
||||||
"flexoki": { "branch": "main", "commit": "975654bce67514114db89373539621cff42befb5" },
|
"flexoki": { "branch": "main", "commit": "975654bce67514114db89373539621cff42befb5" },
|
||||||
"git-blame.nvim": { "branch": "master", "commit": "a0282d05adbee80aaf4e2ff35b81b52940b67bed" },
|
"friendly-snippets": { "branch": "main", "commit": "ea068f1becd91bcd4591fceb6420d4335e2e14d3" },
|
||||||
|
"git-blame.nvim": { "branch": "master", "commit": "ad1d1365c9189d89797fe8d559677d5f55dc2830" },
|
||||||
|
"gitmoji.nvim": { "branch": "main", "commit": "326ddf01cbf3425566a089126ece7e8bd2560601" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "31ddbea7c10b6920c9077b66c97951ca8682d5c8" },
|
"lazy.nvim": { "branch": "main", "commit": "31ddbea7c10b6920c9077b66c97951ca8682d5c8" },
|
||||||
"lualine.nvim": { "branch": "master", "commit": "b5e8bb642138f787a2c1c5aedc2a78cb2cebbd67" },
|
"lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" },
|
||||||
"nvim": { "branch": "main", "commit": "aebe43db9cb26e1c70fc5b2fd4158169c405e720" },
|
"nvim": { "branch": "main", "commit": "a1439ad7c584efb3d0ce14ccb835967f030450fe" },
|
||||||
"nvim-dap": { "branch": "master", "commit": "405df1dcc2e395ab5173a9c3d00e03942c023074" },
|
"nvim-cmp": { "branch": "main", "commit": "ce16de5665c766f39c271705b17fff06f7bcb84f" },
|
||||||
|
"nvim-dap": { "branch": "master", "commit": "6ae8a14828b0f3bff1721a35a1dfd604b6a933bb" },
|
||||||
"nvim-dap-ruby": { "branch": "main", "commit": "a2248b7b31f6f096b9e847e769afd00060e0aae4" },
|
"nvim-dap-ruby": { "branch": "main", "commit": "a2248b7b31f6f096b9e847e769afd00060e0aae4" },
|
||||||
"nvim-dap-ui": { "branch": "master", "commit": "edfa93f60b189e5952c016eee262d0685d838450" },
|
"nvim-dap-ui": { "branch": "master", "commit": "edfa93f60b189e5952c016eee262d0685d838450" },
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "96e5711040df23583591391ce49e556b8cd248d8" },
|
"nvim-lspconfig": { "branch": "master", "commit": "ed8b8a15acc441aec669f97d75f2c1f2ac8c8aa5" },
|
||||||
"nvim-nio": { "branch": "master", "commit": "5800f585def265d52f1d8848133217c800bcb25d" },
|
"nvim-nio": { "branch": "master", "commit": "5800f585def265d52f1d8848133217c800bcb25d" },
|
||||||
"nvim-surround": { "branch": "main", "commit": "84a26afce16cffa7e3322cfa80a42cddf60616eb" },
|
"nvim-surround": { "branch": "main", "commit": "a4e30d33add8a9743b4f518b3a788b3c8e5def71" },
|
||||||
"nvim-tmux-navigation": { "branch": "main", "commit": "4898c98702954439233fdaf764c39636681e2861" },
|
"nvim-tmux-navigation": { "branch": "main", "commit": "4898c98702954439233fdaf764c39636681e2861" },
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "1b050206e490a4146cdf25c7b38969c1711b5620" },
|
"nvim-treesitter": { "branch": "master", "commit": "fea5808a58dc00b7131163886fe2648bbcae9dff" },
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "3ee60deaa539360518eaab93a6c701fe9f4d82ef" },
|
"nvim-web-devicons": { "branch": "master", "commit": "b3468391470034353f0e5110c70babb5c62967d3" },
|
||||||
"plenary.nvim": { "branch": "master", "commit": "8aad4396840be7fc42896e3011751b7609ca4119" },
|
"plenary.nvim": { "branch": "master", "commit": "8aad4396840be7fc42896e3011751b7609ca4119" },
|
||||||
"rspec.nvim": { "branch": "main", "commit": "304682100b152071c2186994690c9646a5d46e05" },
|
"rspec.nvim": { "branch": "main", "commit": "c9b9d530707221483ad737ca5329110b8e4b5a23" },
|
||||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "9ef21b2e6bb6ebeaf349a0781745549bbb870d27" },
|
"telescope-fzf-native.nvim": { "branch": "main", "commit": "9ef21b2e6bb6ebeaf349a0781745549bbb870d27" },
|
||||||
"telescope.nvim": { "branch": "master", "commit": "4626aaa2bcfdacf55fd6d44b430e2df81b2403ff" },
|
"telescope.nvim": { "branch": "master", "commit": "d00d9df48c00d8682c14c2b5da78bda7ef06b939" },
|
||||||
"todo-comments.nvim": { "branch": "main", "commit": "a7e39ae9e74f2c8c6dc4eea6d40c3971ae84752d" },
|
"todo-comments.nvim": { "branch": "main", "commit": "a7e39ae9e74f2c8c6dc4eea6d40c3971ae84752d" },
|
||||||
"undotree": { "branch": "master", "commit": "aa93a7e5890dbbebbc064cd22260721a6db1a196" },
|
"undotree": { "branch": "master", "commit": "56c684a805fe948936cda0d1b19505b84ad7e065" },
|
||||||
"vim-doge": { "branch": "master", "commit": "a96aef58c04e30caf0ce6e98da2e43694624df18" },
|
"vim-doge": { "branch": "master", "commit": "a96aef58c04e30caf0ce6e98da2e43694624df18" },
|
||||||
"which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" }
|
"which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" }
|
||||||
}
|
}
|
||||||
@@ -26,5 +26,8 @@ return {
|
|||||||
replace = nil,
|
replace = nil,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
|
keys = {
|
||||||
|
{ '<Leader>ct', function() require('cloak').toggle() end, { desc = 'Toggle cloak' } },
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
56
nvim/.config/nvim/lua/yock/plugins/completion.lua
Normal file
56
nvim/.config/nvim/lua/yock/plugins/completion.lua
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
return {
|
||||||
|
'hrsh7th/nvim-cmp',
|
||||||
|
dependencies= {
|
||||||
|
'hrsh7th/cmp-nvim-lsp',
|
||||||
|
'hrsh7th/cmp-buffer',
|
||||||
|
'hrsh7th/cmp-path',
|
||||||
|
'hrsh7th/cmp-cmdline',
|
||||||
|
'hrsh7th/cmp-emoji',
|
||||||
|
'L3MON4D3/LuaSnip',
|
||||||
|
'saadparwaiz1/cmp_luasnip',
|
||||||
|
'rafamadriz/friendly-snippets',
|
||||||
|
'PhilRunninger/cmp-rpncalc',
|
||||||
|
'andersevenrud/cmp-tmux',
|
||||||
|
'tamago324/cmp-zsh',
|
||||||
|
'Dynge/gitmoji.nvim',
|
||||||
|
'SergioRibera/cmp-dotenv',
|
||||||
|
},
|
||||||
|
build = 'make install jsregexp',
|
||||||
|
config = function()
|
||||||
|
local cmp = require('cmp')
|
||||||
|
local luasnip = require('luasnip')
|
||||||
|
require('luasnip.loaders.from_vscode').lazy_load()
|
||||||
|
|
||||||
|
luasnip.filetype_extend('ruby', { 'rails' })
|
||||||
|
|
||||||
|
cmp.setup({
|
||||||
|
snippet = {
|
||||||
|
expand = function(args)
|
||||||
|
print('expand called')
|
||||||
|
print(args.body)
|
||||||
|
luasnip.lsp_expand(args.body)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
mapping = cmp.mapping.preset.insert({
|
||||||
|
['<C-j>'] = cmp.mapping.scroll_docs(-4),
|
||||||
|
['<C-k>'] = cmp.mapping.scroll_docs(4),
|
||||||
|
['<C-Space>'] = cmp.mapping.complete(),
|
||||||
|
['<C-e>'] = cmp.mapping.abort(),
|
||||||
|
['<CR>'] = cmp.mapping.confirm({ select = true }),
|
||||||
|
}),
|
||||||
|
sources = cmp.config.sources({
|
||||||
|
{ name = 'nvim_lsp:ruby_lsp' },
|
||||||
|
{ name = 'luasnip' },
|
||||||
|
{ name = 'buffer' },
|
||||||
|
{ name = 'path' },
|
||||||
|
{ name = 'cmdline' },
|
||||||
|
{ name = 'rpncalc' },
|
||||||
|
{ name = 'emoji' },
|
||||||
|
{ name = 'gitmoji' },
|
||||||
|
{ name = 'tmux' },
|
||||||
|
{ name = 'zsh' },
|
||||||
|
{ name = 'dotenv' },
|
||||||
|
})
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
||||||
@@ -19,4 +19,9 @@ return {
|
|||||||
dapui.close()
|
dapui.close()
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
keys = {
|
||||||
|
{ '<leader>duo', function() require('dapui').open() end, { desc = 'Open DAP UI' } },
|
||||||
|
{ '<leader>duc', function() require('dapui').close() end, { desc = 'Close DAP UI' } },
|
||||||
|
{ '<leader>dut', function() require('dapui').toggle() end, { desc = 'Toggle DAP UI' } },
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
10
nvim/.config/nvim/lua/yock/plugins/dap.lua
Normal file
10
nvim/.config/nvim/lua/yock/plugins/dap.lua
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
return {
|
||||||
|
'mfussenegger/nvim-dap',
|
||||||
|
config = function() end,
|
||||||
|
keys = {
|
||||||
|
{ '<leader>dtb', function() require('dap').toggle_breakpoint() end, { desc = 'Toggle Breakpoint' } },
|
||||||
|
{ '<leader>dc', function() require('dap').continue() end, { desc = 'Start or continue execution' } },
|
||||||
|
{ '<leader>dso', function() require('dap').step_over() end, { desc = 'Step over' } },
|
||||||
|
{ '<leader>dsi', function() require('dap').step_into() end, { desc = 'Step into' } },
|
||||||
|
}
|
||||||
|
}
|
||||||
5
nvim/.config/nvim/lua/yock/plugins/gitmoji.lua
Normal file
5
nvim/.config/nvim/lua/yock/plugins/gitmoji.lua
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
return {
|
||||||
|
'Dynge/gitmoji.nvim',
|
||||||
|
opts = {},
|
||||||
|
ft = 'gitcommit',
|
||||||
|
}
|
||||||
@@ -4,6 +4,6 @@ return {
|
|||||||
'f-person/git-blame.nvim',
|
'f-person/git-blame.nvim',
|
||||||
'nvim-lua/plenary.nvim',
|
'nvim-lua/plenary.nvim',
|
||||||
'mfussenegger/nvim-dap',
|
'mfussenegger/nvim-dap',
|
||||||
'github/copilot.vim',
|
-- 'github/copilot.vim',
|
||||||
{ 'folke/todo-comments.nvim', dependencies = { 'nvim-lua/plenary.nvim' }, opts = {} },
|
{ 'folke/todo-comments.nvim', dependencies = { 'nvim-lua/plenary.nvim' }, opts = {} },
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,34 @@
|
|||||||
return {
|
return {
|
||||||
'neovim/nvim-lspconfig',
|
'neovim/nvim-lspconfig',
|
||||||
|
dependencies = {
|
||||||
|
'hrsh7th/nvim-cmp',
|
||||||
|
'hrsh7th/cmp-nvim-lsp',
|
||||||
|
},
|
||||||
config = function()
|
config = function()
|
||||||
local lspconfig = require('lspconfig')
|
local lspconfig = require('lspconfig')
|
||||||
|
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||||
|
capabilities.textDocument.completion.completionItem.snippetSupport = true
|
||||||
|
|
||||||
lspconfig.tsserver.setup({})
|
lspconfig.tsserver.setup({ capabilities = capabilities })
|
||||||
--lspconfig.rubocop.setup({})
|
lspconfig.ruby_lsp.setup({ capabilities = capabilities })
|
||||||
lspconfig.ruby_ls.setup({})
|
lspconfig.angularls.setup({ capabilities = capabilities })
|
||||||
lspconfig.angularls.setup({})
|
lspconfig.emmet_ls.setup({
|
||||||
|
capabilities = capabilities,
|
||||||
|
filetypes = {
|
||||||
|
'html',
|
||||||
|
'eruby',
|
||||||
|
'css',
|
||||||
|
'scss',
|
||||||
|
'sass',
|
||||||
|
'javascript',
|
||||||
|
'typescript',
|
||||||
|
'javascriptreact',
|
||||||
|
'typescriptreact'
|
||||||
|
},
|
||||||
|
})
|
||||||
lspconfig.lua_ls.setup({
|
lspconfig.lua_ls.setup({
|
||||||
settings = {
|
settings = {
|
||||||
|
capabilities = capabilities,
|
||||||
Lua = {
|
Lua = {
|
||||||
diagnostics = {
|
diagnostics = {
|
||||||
globals = {
|
globals = {
|
||||||
@@ -19,10 +39,16 @@ return {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
lspconfig.gopls.setup({ capabilities = capabilities })
|
||||||
|
lspconfig.rust_analyzer.setup({ capabilities = capabilities })
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd('LspAttach', {
|
vim.api.nvim_create_autocmd('LspAttach', {
|
||||||
group = vim.api.nvim_create_augroup('UserLspConfig', {}),
|
group = vim.api.nvim_create_augroup('UserLspConfig', {}),
|
||||||
callback = function(ev)
|
callback = function(ev)
|
||||||
|
local client = vim.lsp.get_client_by_id(ev.data.client_id)
|
||||||
|
if client.server_capabilities.inlayHintProvider then
|
||||||
|
vim.lsp.inlay_hint.enable(ev.buf, true)
|
||||||
|
end
|
||||||
-- Enable completion triggered by <c-x><c-o>
|
-- Enable completion triggered by <c-x><c-o>
|
||||||
vim.bo[ev.buf].omnifunc = 'v:lua.vim.lsp.omnifunc'
|
vim.bo[ev.buf].omnifunc = 'v:lua.vim.lsp.omnifunc'
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ return {
|
|||||||
build = ':TSUpdate',
|
build = ':TSUpdate',
|
||||||
opts = {
|
opts = {
|
||||||
-- A list of parser names, or "all" (the five listed parsers should always be installed)
|
-- A list of parser names, or "all" (the five listed parsers should always be installed)
|
||||||
ensure_installed = { "lua", "ruby", "javascript", "typescript", "c" },
|
ensure_installed = { 'lua', 'ruby', 'javascript', 'typescript', 'c', 'css', 'scss', 'go', 'rust' },
|
||||||
|
|
||||||
-- Install parsers synchronously (only applied to `ensure_installed`)
|
-- Install parsers synchronously (only applied to `ensure_installed`)
|
||||||
sync_install = false,
|
sync_install = false,
|
||||||
|
|||||||
@@ -19,15 +19,3 @@ vim.keymap.set('n', '<leader>do', vim.diagnostic.open_float, { desc = 'Open diag
|
|||||||
|
|
||||||
-- Undotree
|
-- Undotree
|
||||||
vim.keymap.set("n", "<leader>u", vim.cmd.UndotreeToggle)
|
vim.keymap.set("n", "<leader>u", vim.cmd.UndotreeToggle)
|
||||||
|
|
||||||
-- DAP
|
|
||||||
vim.keymap.set('n', '<leader>dtb', function() require('dap').toggle_breakpoint() end)
|
|
||||||
vim.keymap.set('n', '<leader>dc', function() require('dap').continue() end)
|
|
||||||
vim.keymap.set('n', '<leader>dso', function() require('dap').step_over() end)
|
|
||||||
vim.keymap.set('n', '<leader>dsi', function() require('dap').step_into() end)
|
|
||||||
vim.keymap.set('n', '<leader>duo', function() require('dapui').open() end)
|
|
||||||
vim.keymap.set('n', '<leader>duc', function() require('dapui').close() end)
|
|
||||||
vim.keymap.set('n', '<leader>dut', function() require('dapui').toggle() end)
|
|
||||||
|
|
||||||
-- Cloak
|
|
||||||
vim.keymap.set('n', '<leader>ct', function() require('cloak').toggle() end, { desc = 'Toggle cloak' })
|
|
||||||
|
|||||||
1
zsh/.gitignore
vendored
1
zsh/.gitignore
vendored
@@ -1 +1,2 @@
|
|||||||
dot-env
|
dot-env
|
||||||
|
dot-zshenv
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ export TERM="xterm-256color"
|
|||||||
export GPG_TTY=$(tty)
|
export GPG_TTY=$(tty)
|
||||||
export EDITOR="code -nw"
|
export EDITOR="code -nw"
|
||||||
export RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl@1.1)"
|
export RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl@1.1)"
|
||||||
export PATH="$(npm -g bin):/usr/local/sbin:$PATH"
|
export PATH="$HOME/go/bin:$(npm -g bin):/usr/local/sbin:$PATH"
|
||||||
|
|
||||||
for file in $HOME/.functions/*.zsh; do
|
for file in $HOME/.functions/*.zsh; do
|
||||||
source $file
|
source $file
|
||||||
|
|||||||
Reference in New Issue
Block a user