Skip to content

Commit

Permalink
Migrate from nvim-lsp-config to mason-lsp (#33)
Browse files Browse the repository at this point in the history
* remove coc settings file

* move from paq to packer

* reasonable lsp-zero and cmp configs

* LSP keybindings
  • Loading branch information
yuujay committed Dec 25, 2022
1 parent 33da27c commit 3fcf74d
Show file tree
Hide file tree
Showing 14 changed files with 310 additions and 261 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ nvim/spell
gh/hosts.yml
git/gitconfig
test
**/packer_compiled.lua
22 changes: 0 additions & 22 deletions nvim/coc-settings.json

This file was deleted.

4 changes: 2 additions & 2 deletions nvim/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
-- vim core settings
require('general')

-- paq-nvim settings & plugins
require('install-plugins')
-- packer-nvim installation & plugins
require('install-plugins-packer')

-- vim plugins settings
require('plugins')
Expand Down
121 changes: 121 additions & 0 deletions nvim/lua/install-plugins-packer.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
-- Based of https://github.com/nvim-lua/kickstart.nvim

local install_path = vim.fn.stdpath 'data' .. '/site/pack/packer/start/packer.nvim'
local is_bootstrap = false
if vim.fn.empty(vim.fn.glob(install_path)) > 0 then
is_bootstrap = true
vim.fn.system { 'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path }
vim.cmd [[packadd packer.nvim]]
end

require('packer').startup(function(use)
-- Package manager
use 'wbthomason/packer.nvim'

use {
'VonHeikemen/lsp-zero.nvim',
requires = {
-- LSP Support
{'neovim/nvim-lspconfig'},
{'williamboman/mason.nvim'},
{'williamboman/mason-lspconfig.nvim'},

-- Autocompletion
{'hrsh7th/nvim-cmp'},
{'hrsh7th/cmp-buffer'},
{'hrsh7th/cmp-path'},
{'saadparwaiz1/cmp_luasnip'},
{'hrsh7th/cmp-nvim-lsp'},
{'hrsh7th/cmp-nvim-lua'},

-- Snippets
{'L3MON4D3/LuaSnip'},
{'rafamadriz/friendly-snippets'},
{'saadparwaiz1/cmp_luasnip'},
}
}

-- Movements
use 'junegunn/fzf'
use 'phaazon/hop.nvim' -- EASYMOTION IN LUA #TOP5
use 'christoomey/vim-sort-motion'
use 'christoomey/vim-tmux-navigator'
use 'christoomey/vim-tmux-runner'
use 'scrooloose/nerdtree'

-- Telescope related
use 'nvim-lua/popup.nvim'
use 'nvim-lua/plenary.nvim'
use 'nvim-telescope/telescope.nvim'
use {'nvim-telescope/telescope-fzf-native.nvim', run = 'make'} -- Required to make use of fzf for searching in telescope.

-- Grammer
use 'jiangmiao/auto-pairs'
use 'tpope/vim-commentary'
use 'tpope/vim-endwise'
use 'tpope/vim-fugitive'
use 'tpope/vim-rhubarb' -- Required to make opening repositories on the browser easier when required.
use 'tpope/vim-surround'
use 'michaeljsmith/vim-indent-object'

-- Cosmetics
use 'airblade/vim-gitgutter'
use 'akinsho/bufferline.nvim'
use 'kyazdani42/nvim-web-devicons'
use 'onsails/lspkind-nvim'
use 'projekt0n/github-nvim-theme'
use 'junegunn/limelight.vim'
-- use 'tjdevries/colorbuddy.nvim' -- Not-mandatory used in autocomplete floating menu bar


-- Status lines and fonts used in the statusline.
use 'powerline/fonts'
use 'vim-airline/vim-airline'
use 'ryanoasis/vim-devicons' -- This needs to be at the end since we devicons need to loaded after all plugins

-- Markdown preview
use 'ellisonleao/glow.nvim'

-- Nvim clients outside of terminal
use {'glacambre/firenvim', run='firenvim#install(1)'}

-- For Obsidian
use 'epwalsh/obsidian.nvim'

-- "alvan/vim-closetag",
-- "b3nj5m1n/kommentary",
-- "rmagatti/auto-session",
-- "wellle/targets.vim",
-- 'https://github.com/Yggdroot/indentLine.git'
-- 'kyazdani42/nvim-tree.lua',
-- 'WaylonWalker/Telegraph.nvim', -- Check if this is better than vim-tmux-runner.
-- 'lukas-reineke/indent-blankline.nvim',
-- https://github.com/itchyny/lightline.vim TODO: Check this out over airline

-- TODO:
-- Try these set of plugins next. Finer configurations
-- 'tpope/vim-projectionist' -- Too cool to configure and have it working.
-- 'vim-test/vim-test'
-- 'ThePrimeagen/harpoon'
-- 'code-biscuits/nvim-biscuits'
-- 'chipsenkbeil/distant.nvim' -- NIFTY_ONE - Remote development from vim

-- OLDER PLUGINS
-- 'junegunn/fzf.vim', --Using telescope instead of this.
-- 'voldikss/vim-floaterm' -- Not particularly useful if vim is used within tmux
-- 'mhartington/formatter.nvim', -- Not sure if this is required.


-- Add custom plugins to packer from ~/.config/nvim/lua/custom/plugins.lua
local has_plugins, plugins = pcall(require, 'custom.plugins')
if has_plugins then
plugins(use)
end

if is_bootstrap then
require('packer').sync()
end
end)

-- After plugin install configs
require('plugins.plugin-after')
127 changes: 0 additions & 127 deletions nvim/lua/install-plugins.lua

This file was deleted.

65 changes: 0 additions & 65 deletions nvim/lua/plugins/lsp/cmp.lua

This file was deleted.

4 changes: 3 additions & 1 deletion nvim/lua/plugins/lsp/init.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
-- require ('plugins.lsp.lspsaga')
require ('plugins.lsp.telescope')
require ('plugins.lsp.cmp')
-- require ('plugins.lsp.cmp') -- DELETED
require ('plugins.lsp.mason')
require ('plugins.lsp.lsp-zero')
require ('plugins.lsp.nvim-lspconfig')
require ('plugins.lsp.servers')
require ('plugins.lsp.snippets')
Expand Down
Loading

0 comments on commit 3fcf74d

Please sign in to comment.