Compare commits

..

3 Commits

2 changed files with 31 additions and 79 deletions

View File

@@ -16,7 +16,4 @@ COPY init.vim .
RUN mkdir -p ~/.config/nvim \
&& mv ./init.vim ~/.config/nvim
RUN sh -c 'curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
RUN nvim -c "PlugInstall" -c "qall" \
&& nvim -c "TSUpdate" -c "qall"
RUN nvim -c "lua vim.pack.update()" -c "qall"

101
init.vim
View File

@@ -7,54 +7,39 @@ let g:loaded_netrwPlugin = 1
let &t_TI = "\<Esc>[>4;2m"
let &t_TE = "\<Esc>[>4;m"
" Automatically install vim-plug plugin manager
" https://github.com/junegunn/vim-plug/wiki/tips#automatic-installation
let data_dir = has('nvim') ? stdpath('data') . '/site' : '~/.vim'
if empty(glob(data_dir . '/autoload/plug.vim'))
silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
lua <<
vim.pack.add({
'https://github.com/nvim-tree/nvim-web-devicons', -- optional
'https://github.com/nvim-tree/nvim-tree.lua',
call plug#begin()
'https://github.com/nvim-treesitter/nvim-treesitter',
Plug 'nvim-tree/nvim-web-devicons' " optional
Plug 'nvim-tree/nvim-tree.lua'
'https://github.com/Mofiqul/dracula.nvim',
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
'https://github.com/nvim-lualine/lualine.nvim',
"Plug 'mg979/vim-visual-multi', {'branch': 'master'}
'https://github.com/akinsho/bufferline.nvim',
Plug 'Mofiqul/dracula.nvim'
'https://github.com/nvim-lua/plenary.nvim',
'https://github.com/nvim-telescope/telescope.nvim',
Plug 'nvim-lualine/lualine.nvim'
-- For managing lsps
'https://github.com/williamboman/mason.nvim',
Plug 'akinsho/bufferline.nvim', { 'tag': '*' }
-- Delete, change and add surrounding pairs
'https://github.com/kylechui/nvim-surround',
Plug 'nvim-lua/plenary.nvim'
Plug 'nvim-telescope/telescope.nvim', { 'branch': '0.1.x' }
-- Indent line
'https://github.com/lukas-reineke/indent-blankline.nvim',
" Installation manager for 'ripgrep' search tool
Plug 'iruzo/ripgrep.nvim'
'https://github.com/airblade/vim-gitgutter',
" Not sure if this is useful?
" Plug 'rafcamlet/nvim-luapad'
" For managing lsps
Plug 'williamboman/mason.nvim'
Plug 'neovim/nvim-lspconfig'
" Delete, change and add surrounding pairs
Plug 'kylechui/nvim-surround'
" Indent line
Plug 'lukas-reineke/indent-blankline.nvim'
Plug 'airblade/vim-gitgutter'
" Highlight syntax and support indent for MoonScript
Plug 'leafo/moonscript-vim'
call plug#end()
-- Highlight syntax and support indent for MoonScript
'https://github.com/leafo/moonscript-vim',
}, {
confirm = false
})
.
colorscheme dracula
set termguicolors
@@ -201,43 +186,13 @@ require('telescope').setup({
.
lua <<
local lspconfig = require('lspconfig')
local configs = require('lspconfig.configs')
if not configs.lua_ls then
configs.lua_ls = {
default_config = {
cmd = {vim.fn.expand('~/.local/bin/lua-language-server')},
vim.lsp.config['lua_ls'] = {
cmd = { 'lua-language-server' },
filetypes = { 'lua' },
single_file_support = true,
autostart = true,
root_markers = { '.luarc.json', '.git' },
settings = { Lua = { diagnostics = { globals = { "vim" } } } }
}
}
end
lspconfig.lua_ls.setup({
settings = {
Lua = {
diagnostics = {
globals = { "love" },
}
}
}
})
lspconfig.cssls.setup({})
.
lua <<
-- require('lspconfig').lua_ls.setup({
-- settings = {
-- Lua = {
-- runtime = {
-- version = "LuaJIT"
-- }
-- }
-- }
-- })
vim.lsp.enable('lua_ls')
.
lua require("mason").setup()