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

Move stuff into custom + Java + Copilot #3

Merged
merged 9 commits into from
May 6, 2024
Merged
34 changes: 9 additions & 25 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,6 @@ require('lazy').setup({
-- "gc" to comment visual regions/lines
{ 'numToStr/Comment.nvim', opts = {} },

'github/copilot.vim',
{ 'pocco81/auto-save.nvim' },
-- Here is a more advanced example where we pass configuration
-- options to `gitsigns.nvim`. This is equivalent to the following Lua:
-- require('gitsigns').setup({ ... })
Expand Down Expand Up @@ -414,15 +412,6 @@ require('lazy').setup({
end, { desc = '[S]earch [N]eovim files' })
end,
},
{
'ibhagwan/fzf-lua',
-- optional for icon support
dependencies = { 'nvim-tree/nvim-web-devicons' },
config = function()
-- calling `setup` is optional for customization
require('fzf-lua').setup {}
end,
},
{ -- LSP Configuration & Plugins
'neovim/nvim-lspconfig',
dependencies = {
Expand Down Expand Up @@ -541,6 +530,14 @@ require('lazy').setup({
group = highlight_augroup,
callback = vim.lsp.buf.clear_references,
})

vim.api.nvim_create_autocmd('LspDetach', {
group = vim.api.nvim_create_augroup('kickstart-lsp-detach', { clear = true }),
callback = function(event2)
vim.lsp.buf.clear_references()
vim.api.nvim_clear_autocmds { group = 'kickstart-lsp-highlight', buffer = event2.buf }
end,
})
end

-- The following autocommand is used to enable inlay hints in your
Expand All @@ -555,14 +552,6 @@ require('lazy').setup({
end,
})

vim.api.nvim_create_autocmd('LspDetach', {
group = vim.api.nvim_create_augroup('kickstart-lsp-detach', { clear = true }),
callback = function(event)
vim.lsp.buf.clear_references()
vim.api.nvim_clear_autocmds { group = 'kickstart-lsp-highlight', buffer = event.buf }
end,
})

-- LSP servers and clients are able to communicate to each other what features they support.
-- By default, Neovim doesn't support everything that is in the LSP specification.
-- When you add nvim-cmp, luasnip, etc. Neovim now has *more* capabilities.
Expand Down Expand Up @@ -883,7 +872,7 @@ require('lazy').setup({
'nvim-treesitter/nvim-treesitter',
build = ':TSUpdate',
opts = {
ensure_installed = { 'bash', 'c', 'html', 'lua', 'luadoc', 'markdown', 'vim' },
ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'vim', 'vimdoc' },
-- Autoinstall languages that are not installed
auto_install = true,
highlight = {
Expand Down Expand Up @@ -911,11 +900,6 @@ require('lazy').setup({
-- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects
end,
},
-- {
-- 'mrcjkb/rustaceanvim',
-- version = '^4', -- Recommended
-- lazy = false, -- This plugin is already lazy
-- },
-- The following two comments only work if you have downloaded the kickstart repo, not just copy pasted the
-- init.lua. If you want these files, they are in the repository, so you can just download them and
-- place them in the correct locations.
Expand Down
15 changes: 14 additions & 1 deletion lua/custom/plugins/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,17 @@
-- I promise not to create any merge conflicts in this directory :)
--
-- See the kickstart.nvim README for more information
return {}

return {
{ 'pocco81/auto-save.nvim' },
'github/copilot.vim',
{
'ibhagwan/fzf-lua',
-- optional for icon support
dependencies = { 'nvim-tree/nvim-web-devicons' },
config = function()
-- calling `setup` is optional for customization
require('fzf-lua').setup {}
end,
},
}