Add a bunch more plugins and configurations
- lualine - bufferline - nvim-jdtls
This commit is contained in:
parent
dceb69cf01
commit
8adb8243a0
10 changed files with 239 additions and 158 deletions
146
config.yaml
146
config.yaml
|
@ -30,9 +30,12 @@ dotfiles:
|
||||||
src: .config/nvim/init.lua
|
src: .config/nvim/init.lua
|
||||||
d_nvim_lua:
|
d_nvim_lua:
|
||||||
actions:
|
actions:
|
||||||
- nvim-packer-install
|
- nvim-packer-install
|
||||||
dst: ~/.config/nvim/lua
|
dst: ~/.config/nvim/lua
|
||||||
src: .config/nvim/lua
|
src: .config/nvim/lua
|
||||||
|
d_nvim_scripts:
|
||||||
|
dst: ~/.config/nvim/scripts
|
||||||
|
src: .config/nvim/scripts
|
||||||
f_user-dirs.dirs:
|
f_user-dirs.dirs:
|
||||||
dst: ~/.config/user-dirs.dirs
|
dst: ~/.config/user-dirs.dirs
|
||||||
src: .config/user-dirs.dirs
|
src: .config/user-dirs.dirs
|
||||||
|
@ -162,106 +165,107 @@ dotfiles:
|
||||||
f_gpg-agent.conf:
|
f_gpg-agent.conf:
|
||||||
src: .gnupg/gpg-agent.conf
|
src: .gnupg/gpg-agent.conf
|
||||||
dst: ~/.gnupg/gpg-agent.conf
|
dst: ~/.gnupg/gpg-agent.conf
|
||||||
chmod: '600'
|
chmod: "600"
|
||||||
f_gpg.conf:
|
f_gpg.conf:
|
||||||
src: .gnupg/gpg.conf
|
src: .gnupg/gpg.conf
|
||||||
dst: ~/.gnupg/gpg.conf
|
dst: ~/.gnupg/gpg.conf
|
||||||
profiles:
|
profiles:
|
||||||
base:
|
base:
|
||||||
dotfiles:
|
dotfiles:
|
||||||
- d_systemd
|
- d_systemd
|
||||||
terminal:
|
terminal:
|
||||||
dotfiles:
|
dotfiles:
|
||||||
- f_nvimpager
|
- f_nvimpager
|
||||||
- f_hushlogin
|
- f_hushlogin
|
||||||
- f_ripgrep_ignore
|
- f_ripgrep_ignore
|
||||||
- f_ranger_commands.py
|
- f_ranger_commands.py
|
||||||
- f_rtv.cfg
|
- f_rtv.cfg
|
||||||
- f_mailcap
|
- f_mailcap
|
||||||
- d_zsh
|
- d_zsh
|
||||||
- f_zshrc
|
- f_zshrc
|
||||||
- f_tmux.conf
|
- f_tmux.conf
|
||||||
- f_ranger.conf
|
- f_ranger.conf
|
||||||
- f_ssh.conf
|
- f_ssh.conf
|
||||||
- f_authorized_keys
|
- f_authorized_keys
|
||||||
- d_nvim_lua
|
- d_nvim_lua
|
||||||
- f_nvim_init
|
- d_nvim_scripts
|
||||||
- f_gitconfig
|
- f_nvim_init
|
||||||
- f_alacritty.yml
|
- f_gitconfig
|
||||||
|
- f_alacritty.yml
|
||||||
email:
|
email:
|
||||||
dotfiles:
|
dotfiles:
|
||||||
- d_neomutt
|
- d_neomutt
|
||||||
- d_imapnotify
|
- d_imapnotify
|
||||||
- f_mbsyncrc
|
- f_mbsyncrc
|
||||||
- f_msmtp_config
|
- f_msmtp_config
|
||||||
media:
|
media:
|
||||||
dotfiles:
|
dotfiles:
|
||||||
- f_beets_config
|
- f_beets_config
|
||||||
- f_beets_whitelist
|
- f_beets_whitelist
|
||||||
- f_abcde.conf
|
- f_abcde.conf
|
||||||
- d_mpv
|
- d_mpv
|
||||||
- f_youtube-dl_config
|
- f_youtube-dl_config
|
||||||
- f_mpd.conf
|
- f_mpd.conf
|
||||||
- f_ncmpcpp_bindings
|
- f_ncmpcpp_bindings
|
||||||
- f_ncmpcpp.conf
|
- f_ncmpcpp.conf
|
||||||
- f_libra_config
|
- f_libra_config
|
||||||
- f_mpdscribble.conf
|
- f_mpdscribble.conf
|
||||||
- f_mpdris2.conf
|
- f_mpdris2.conf
|
||||||
sway:
|
sway:
|
||||||
dotfiles:
|
dotfiles:
|
||||||
- d_sway
|
- d_sway
|
||||||
- d_waybar
|
- d_waybar
|
||||||
- d_wofi
|
- d_wofi
|
||||||
- f_mako_config
|
- f_mako_config
|
||||||
- f_redshift.conf
|
- f_redshift.conf
|
||||||
- f_zathurarc
|
- f_zathurarc
|
||||||
- f_mimeo_associations.txt
|
- f_mimeo_associations.txt
|
||||||
- f_tdesktop_lang.strings
|
- f_tdesktop_lang.strings
|
||||||
- f_fonts.conf
|
- f_fonts.conf
|
||||||
- f_zprofile
|
- f_zprofile
|
||||||
Pacman:
|
Pacman:
|
||||||
dotfiles:
|
dotfiles:
|
||||||
- f_makepkg.conf
|
- f_makepkg.conf
|
||||||
- f_paru.conf
|
- f_paru.conf
|
||||||
Mirkwood:
|
Mirkwood:
|
||||||
include:
|
include:
|
||||||
- base
|
- base
|
||||||
- terminal
|
- terminal
|
||||||
- email
|
- email
|
||||||
- media
|
- media
|
||||||
- sway
|
- sway
|
||||||
- Pacman
|
- Pacman
|
||||||
dotfiles:
|
dotfiles:
|
||||||
- f_paru.conf
|
- f_paru.conf
|
||||||
- f_user-dirs.dirs
|
- f_user-dirs.dirs
|
||||||
- f_gitconfig
|
- f_gitconfig
|
||||||
- f_foot.ini
|
- f_foot.ini
|
||||||
- f_gpg-agent.conf
|
- f_gpg-agent.conf
|
||||||
- f_gpg.conf
|
- f_gpg.conf
|
||||||
Moria:
|
Moria:
|
||||||
include:
|
include:
|
||||||
- terminal
|
- terminal
|
||||||
- media
|
- media
|
||||||
- Pacman
|
- Pacman
|
||||||
Gondor:
|
Gondor:
|
||||||
include:
|
include:
|
||||||
- terminal
|
- terminal
|
||||||
- Pacman
|
- Pacman
|
||||||
mko-laptop:
|
mko-laptop:
|
||||||
include:
|
include:
|
||||||
- terminal
|
- terminal
|
||||||
- media
|
- media
|
||||||
Edoras:
|
Edoras:
|
||||||
include:
|
include:
|
||||||
- terminal
|
- terminal
|
||||||
- Pacman
|
- Pacman
|
||||||
TakamakiPC:
|
TakamakiPC:
|
||||||
include:
|
include:
|
||||||
- terminal
|
- terminal
|
||||||
- Pacman
|
- Pacman
|
||||||
localhost:
|
localhost:
|
||||||
include:
|
include:
|
||||||
- terminal
|
- terminal
|
||||||
ViiruJaTeippi:
|
ViiruJaTeippi:
|
||||||
include:
|
include:
|
||||||
- terminal
|
- terminal
|
||||||
|
|
|
@ -4,8 +4,10 @@ require 'keybinds'
|
||||||
require 'settings'
|
require 'settings'
|
||||||
|
|
||||||
-- Plugin configurations
|
-- Plugin configurations
|
||||||
require 'pluginconf.airline'
|
require 'pluginconf.lualine'
|
||||||
|
require 'pluginconf.bufferline'
|
||||||
require 'pluginconf.completion'
|
require 'pluginconf.completion'
|
||||||
require 'pluginconf.lsp'
|
require 'pluginconf.lsp'
|
||||||
require 'pluginconf.treesitter'
|
require 'pluginconf.treesitter'
|
||||||
require 'pluginconf.telescope'
|
require 'pluginconf.telescope'
|
||||||
|
-- require 'pluginconf.indent-blankline'
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
local g = vim.g
|
|
||||||
local o = vim.o
|
|
||||||
|
|
||||||
o.showmode = false
|
|
||||||
o.laststatus = 2
|
|
||||||
g["airline#extensions#tabline#enabled"] = 1
|
|
||||||
g.airline_powerline_fonts = 1
|
|
||||||
g.airline_section_warning = ''
|
|
||||||
g.airline_section_error = ''
|
|
||||||
g.airline_theme = 'onedark'
|
|
1
home/.config/nvim/lua/pluginconf/bufferline.lua
Normal file
1
home/.config/nvim/lua/pluginconf/bufferline.lua
Normal file
|
@ -0,0 +1 @@
|
||||||
|
require("bufferline").setup{}
|
1
home/.config/nvim/lua/pluginconf/indent-blankline.lua
Normal file
1
home/.config/nvim/lua/pluginconf/indent-blankline.lua
Normal file
|
@ -0,0 +1 @@
|
||||||
|
require('indent_blankline').setup {filetype_exclude = {'help'}}
|
|
@ -1,105 +1,143 @@
|
||||||
|
-- List of servers to install
|
||||||
|
local required_servers = {
|
||||||
|
"css", "html", "java", "json", "lua", "rust", "yaml", "dockerfile", "latex",
|
||||||
|
"bash", "typescript", "php"
|
||||||
|
}
|
||||||
|
|
||||||
-- keymaps
|
-- keymaps
|
||||||
local on_attach = function(client, bufnr)
|
local on_attach = function(client, bufnr)
|
||||||
local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end
|
local function buf_set_keymap(...)
|
||||||
local function buf_set_option(...) vim.api.nvim_buf_set_option(bufnr, ...) end
|
vim.api.nvim_buf_set_keymap(bufnr, ...)
|
||||||
|
end
|
||||||
|
local function buf_set_option(...)
|
||||||
|
vim.api.nvim_buf_set_option(bufnr, ...)
|
||||||
|
end
|
||||||
|
|
||||||
buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc')
|
buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc')
|
||||||
|
|
||||||
-- Mappings.
|
-- Mappings.
|
||||||
local opts = { noremap=true, silent=true }
|
local opts = {noremap = true, silent = true}
|
||||||
buf_set_keymap('n', 'gD', '<Cmd>lua vim.lsp.buf.declaration()<CR>', opts)
|
buf_set_keymap('n', 'gD', '<Cmd>lua vim.lsp.buf.declaration()<CR>', opts)
|
||||||
buf_set_keymap('n', 'gd', '<Cmd>lua vim.lsp.buf.definition()<CR>', opts)
|
buf_set_keymap('n', 'gd', '<Cmd>lua vim.lsp.buf.definition()<CR>', opts)
|
||||||
buf_set_keymap('n', 'K', '<Cmd>lua vim.lsp.buf.hover()<CR>', opts)
|
buf_set_keymap('n', 'K', '<Cmd>lua vim.lsp.buf.hover()<CR>', opts)
|
||||||
buf_set_keymap('n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<CR>', opts)
|
buf_set_keymap('n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<CR>', opts)
|
||||||
buf_set_keymap('n', '<C-k>', '<cmd>lua vim.lsp.buf.signature_help()<CR>', opts)
|
buf_set_keymap('n', '<C-k>', '<cmd>lua vim.lsp.buf.signature_help()<CR>',
|
||||||
buf_set_keymap('n', '<space>wa', '<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>', opts)
|
opts)
|
||||||
buf_set_keymap('n', '<space>wr', '<cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>', opts)
|
buf_set_keymap('n', '<space>wa',
|
||||||
buf_set_keymap('n', '<space>wl', '<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>', opts)
|
'<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>', opts)
|
||||||
buf_set_keymap('n', '<space>D', '<cmd>lua vim.lsp.buf.type_definition()<CR>', opts)
|
buf_set_keymap('n', '<space>wr',
|
||||||
buf_set_keymap('n', '<space>rn', '<cmd>lua vim.lsp.buf.rename()<CR>', opts)
|
'<cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>', opts)
|
||||||
buf_set_keymap('n', 'gr', '<cmd>lua vim.lsp.buf.references()<CR>', opts)
|
buf_set_keymap('n', '<space>wl',
|
||||||
buf_set_keymap('n', '<space>e', '<cmd>lua vim.lsp.diagnostic.show_line_diagnostics()<CR>', opts)
|
'<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>',
|
||||||
buf_set_keymap('n', '[d', '<cmd>lua vim.lsp.diagnostic.goto_prev()<CR>', opts)
|
opts)
|
||||||
buf_set_keymap('n', ']d', '<cmd>lua vim.lsp.diagnostic.goto_next()<CR>', opts)
|
buf_set_keymap('n', '<space>D',
|
||||||
buf_set_keymap('n', '<space>q', '<cmd>lua vim.lsp.diagnostic.set_loclist()<CR>', opts)
|
'<cmd>lua vim.lsp.buf.type_definition()<CR>', opts)
|
||||||
|
buf_set_keymap('n', '<space>rn', '<cmd>lua vim.lsp.buf.rename()<CR>', opts)
|
||||||
|
buf_set_keymap('n', 'gr', '<cmd>lua vim.lsp.buf.references()<CR>', opts)
|
||||||
|
buf_set_keymap('n', '<space>e',
|
||||||
|
'<cmd>lua vim.lsp.diagnostic.show_line_diagnostics()<CR>',
|
||||||
|
opts)
|
||||||
|
buf_set_keymap('n', '[d', '<cmd>lua vim.lsp.diagnostic.goto_prev()<CR>',
|
||||||
|
opts)
|
||||||
|
buf_set_keymap('n', ']d', '<cmd>lua vim.lsp.diagnostic.goto_next()<CR>',
|
||||||
|
opts)
|
||||||
|
buf_set_keymap('n', '<space>q',
|
||||||
|
'<cmd>lua vim.lsp.diagnostic.set_loclist()<CR>', opts)
|
||||||
|
|
||||||
-- Set some keybinds conditional on server capabilities
|
-- Set some keybinds conditional on server capabilities
|
||||||
if client.resolved_capabilities.document_formatting then
|
if client.resolved_capabilities.document_formatting then
|
||||||
buf_set_keymap("n", "<space>f", "<cmd>lua vim.lsp.buf.formatting()<CR>", opts)
|
buf_set_keymap("n", "<space>f", "<cmd>lua vim.lsp.buf.formatting()<CR>",
|
||||||
elseif client.resolved_capabilities.document_range_formatting then
|
opts)
|
||||||
buf_set_keymap("n", "<space>f", "<cmd>lua vim.lsp.buf.range_formatting()<CR>", opts)
|
elseif client.resolved_capabilities.document_range_formatting then
|
||||||
end
|
buf_set_keymap("n", "<space>f",
|
||||||
|
"<cmd>lua vim.lsp.buf.range_formatting()<CR>", opts)
|
||||||
|
end
|
||||||
|
|
||||||
-- Set autocommands conditional on server_capabilities
|
-- Set autocommands conditional on server_capabilities
|
||||||
if client.resolved_capabilities.document_highlight then
|
if client.resolved_capabilities.document_highlight then
|
||||||
vim.api.nvim_exec([[
|
vim.api.nvim_exec([[
|
||||||
augroup lsp_document_highlight
|
augroup lsp_document_highlight
|
||||||
autocmd! * <buffer>
|
autocmd! * <buffer>
|
||||||
autocmd CursorHold <buffer> lua vim.lsp.buf.document_highlight()
|
autocmd CursorHold <buffer> lua vim.lsp.buf.document_highlight()
|
||||||
autocmd CursorMoved <buffer> lua vim.lsp.buf.clear_references()
|
autocmd CursorMoved <buffer> lua vim.lsp.buf.clear_references()
|
||||||
augroup END
|
augroup END
|
||||||
]], false)
|
]], false)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
--
|
|
||||||
-- Configure lua language server for neovim development
|
-- Configure lua language server for neovim development
|
||||||
local lua_settings = {
|
local lua_settings = {
|
||||||
Lua = {
|
Lua = {
|
||||||
runtime = {
|
runtime = {
|
||||||
-- LuaJIT in the case of Neovim
|
-- LuaJIT in the case of Neovim
|
||||||
version = 'LuaJIT',
|
version = 'LuaJIT',
|
||||||
path = vim.split(package.path, ';'),
|
path = vim.split(package.path, ';')
|
||||||
},
|
},
|
||||||
diagnostics = {
|
diagnostics = {
|
||||||
-- Get the language server to recognize the `vim` global
|
-- Get the language server to recognize the `vim` global
|
||||||
globals = {'vim'},
|
globals = {'vim'}
|
||||||
},
|
},
|
||||||
workspace = {
|
workspace = {
|
||||||
-- Make the server aware of Neovim runtime files
|
-- Make the server aware of Neovim runtime files
|
||||||
library = {
|
library = {
|
||||||
[vim.fn.expand('$VIMRUNTIME/lua')] = true,
|
[vim.fn.expand('$VIMRUNTIME/lua')] = true,
|
||||||
[vim.fn.expand('$VIMRUNTIME/lua/vim/lsp')] = true,
|
[vim.fn.expand('$VIMRUNTIME/lua/vim/lsp')] = true
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
-- config that activates keymaps and enables snippet support
|
-- config that activates keymaps and enables snippet support
|
||||||
local function make_config()
|
local function make_config()
|
||||||
local capabilities = vim .lsp.protocol.make_client_capabilities()
|
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||||
capabilities.textDocument.completion.completionItem.snippetSupport = true
|
capabilities.textDocument.completion.completionItem.snippetSupport = true
|
||||||
return {
|
return {
|
||||||
-- enable snippet support
|
-- enable snippet support
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
-- map buffer local keybindings when the language server attaches
|
-- map buffer local keybindings when the language server attaches
|
||||||
on_attach = on_attach,
|
on_attach = on_attach
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
-- lsp-install
|
-- lsp-install
|
||||||
local function setup_servers()
|
local function setup_servers()
|
||||||
require'lspinstall'.setup()
|
require'lspinstall'.setup()
|
||||||
|
|
||||||
-- get all installed servers
|
-- get all installed servers
|
||||||
local servers = require'lspinstall'.installed_servers()
|
local servers = require'lspinstall'.installed_servers()
|
||||||
|
|
||||||
for _, server in pairs(servers) do
|
-- install server if not already installed but required
|
||||||
local config = make_config()
|
-- for _, server in pairs(required_servers) do
|
||||||
|
-- if not vim.tbl_contains(servers) then
|
||||||
|
-- require'lspinstall'.install_server(server)
|
||||||
|
-- end
|
||||||
|
-- end
|
||||||
|
|
||||||
-- language specific config
|
-- Refresh servers list in case of newly installed servers
|
||||||
if server == "lua" then
|
servers = require'lspinstall'.installed_servers()
|
||||||
config.settings = lua_settings
|
|
||||||
end
|
|
||||||
|
|
||||||
-- setup lspconfig for all servers
|
for _, server in pairs(servers) do
|
||||||
require'lspconfig'[server].setup(config)
|
local config = make_config()
|
||||||
end
|
|
||||||
|
-- language specific config
|
||||||
|
if server == "lua" then config.settings = lua_settings end
|
||||||
|
require'lspconfig'[server].setup(config)
|
||||||
|
|
||||||
|
-- Java LSP client is started by the plugin nvim-jdtls
|
||||||
|
if server == "java" then return end
|
||||||
|
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
setup_servers()
|
setup_servers()
|
||||||
|
|
||||||
|
require('jdtls').start_or_attach({
|
||||||
|
cmd = {'java-lsp.sh'},
|
||||||
|
root_dir = require('jdtls.setup').find_root({'gradle.build', 'pom.xml'})
|
||||||
|
})
|
||||||
|
|
||||||
-- Automatically reload after `:LspInstall <server>` so we don't have to restart neovim
|
-- Automatically reload after `:LspInstall <server>` so we don't have to restart neovim
|
||||||
require'lspinstall'.post_install_hook = function ()
|
require'lspinstall'.post_install_hook = function()
|
||||||
setup_servers() -- reload installed servers
|
setup_servers() -- reload installed servers
|
||||||
vim.cmd("bufdo e") -- this triggers the FileType autocmd that starts the server
|
vim.cmd("bufdo e") -- this triggers the FileType autocmd that starts the server
|
||||||
end
|
end
|
||||||
|
|
3
home/.config/nvim/lua/pluginconf/lualine.lua
Normal file
3
home/.config/nvim/lua/pluginconf/lualine.lua
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
require'lualine'.setup {
|
||||||
|
options = {theme = 'onedark'},
|
||||||
|
}
|
|
@ -20,10 +20,22 @@ require('packer').startup(function()
|
||||||
use {'wbthomason/packer.nvim', opt = true}
|
use {'wbthomason/packer.nvim', opt = true}
|
||||||
|
|
||||||
-- Colorscheme
|
-- Colorscheme
|
||||||
use 'joshdick/onedark.vim'
|
use 'monsonjeremy/onedark.nvim'
|
||||||
|
|
||||||
-- Custom status and tabline
|
-- Statusline
|
||||||
use 'vim-airline/vim-airline'
|
use {
|
||||||
|
'hoob3rt/lualine.nvim',
|
||||||
|
requires = {'kyazdani42/nvim-web-devicons', opt = true}
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Tabline/bufferline
|
||||||
|
use {
|
||||||
|
'akinsho/nvim-bufferline.lua',
|
||||||
|
requires = 'kyazdani42/nvim-web-devicons'
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Indent characters
|
||||||
|
--use "lukas-reineke/indent-blankline.nvim"
|
||||||
|
|
||||||
-- Tree explorer
|
-- Tree explorer
|
||||||
use {'kyazdani42/nvim-tree.lua', requires = 'kyazdani42/nvim-web-devicons'}
|
use {'kyazdani42/nvim-tree.lua', requires = 'kyazdani42/nvim-web-devicons'}
|
||||||
|
@ -46,6 +58,9 @@ require('packer').startup(function()
|
||||||
-- Install LSP executables
|
-- Install LSP executables
|
||||||
use 'kabouzeid/nvim-lspinstall'
|
use 'kabouzeid/nvim-lspinstall'
|
||||||
|
|
||||||
|
-- Extensions for eclipse.jdt.ls
|
||||||
|
use 'mfussenegger/nvim-jdtls'
|
||||||
|
|
||||||
-- Completion framework
|
-- Completion framework
|
||||||
use 'nvim-lua/completion-nvim'
|
use 'nvim-lua/completion-nvim'
|
||||||
|
|
||||||
|
@ -63,6 +78,12 @@ require('packer').startup(function()
|
||||||
-- Formatter plugin
|
-- Formatter plugin
|
||||||
use 'sbdchd/neoformat'
|
use 'sbdchd/neoformat'
|
||||||
|
|
||||||
|
-- Make editing passwords safer
|
||||||
|
use {
|
||||||
|
'https://git.zx2c4.com/password-store',
|
||||||
|
rtp = 'contrib/vim/redact_pass.vim'
|
||||||
|
}
|
||||||
|
|
||||||
end)
|
end)
|
||||||
|
|
||||||
-- Install plugins if packer was not installed
|
-- Install plugins if packer was not installed
|
||||||
|
|
|
@ -5,7 +5,7 @@ local cmd = vim.cmd
|
||||||
------ Appearance ------
|
------ Appearance ------
|
||||||
|
|
||||||
-- Set colorscheme
|
-- Set colorscheme
|
||||||
cmd 'colorscheme onedark'
|
require('onedark').setup()
|
||||||
|
|
||||||
-- True colors
|
-- True colors
|
||||||
o.termguicolors = true
|
o.termguicolors = true
|
||||||
|
@ -19,6 +19,10 @@ o.cmdheight = 1
|
||||||
-- Always show signcolumn
|
-- Always show signcolumn
|
||||||
o.signcolumn = 'yes'
|
o.signcolumn = 'yes'
|
||||||
|
|
||||||
|
-- Blinking cursor
|
||||||
|
cmd 'set guicursor=i:ver1'
|
||||||
|
cmd 'set guicursor+=a:blinkon1'
|
||||||
|
|
||||||
-- Gutter and cursoline bg transparent
|
-- Gutter and cursoline bg transparent
|
||||||
cmd 'highlight CursorLineNr guibg=transparent'
|
cmd 'highlight CursorLineNr guibg=transparent'
|
||||||
cmd 'highlight SignColumn guibg=transparent'
|
cmd 'highlight SignColumn guibg=transparent'
|
||||||
|
|
17
home/.config/nvim/scripts/java-lsp.sh
Executable file
17
home/.config/nvim/scripts/java-lsp.sh
Executable file
|
@ -0,0 +1,17 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
JAR="$HOME/.local/share/nvim/lspinstall/java/plugins/org.eclipse.equinox.launcher_*.jar"
|
||||||
|
GRADLE_HOME=$HOME/gradle /usr/lib/jvm/default/bin/java \
|
||||||
|
-Declipse.application=org.eclipse.jdt.ls.core.id1 \
|
||||||
|
-Dosgi.bundles.defaultStartLevel=4 \
|
||||||
|
-Declipse.product=org.eclipse.jdt.ls.core.product \
|
||||||
|
-Dlog.protocol=true \
|
||||||
|
-Dlog.level=ALL \
|
||||||
|
-Xms1g \
|
||||||
|
-Xmx2G \
|
||||||
|
-jar $(echo "$JAR") \
|
||||||
|
-configuration "$HOME/.local/share/nvim/lspinstall/java/config_linux" \
|
||||||
|
-data "${1:-$HOME/workspace}" \
|
||||||
|
--add-modules=ALL-SYSTEM \
|
||||||
|
--add-opens java.base/java.util=ALL-UNNAMED \
|
||||||
|
--add-opens java.base/java.lang=ALL-UNNAMED
|
Loading…
Add table
Add a link
Reference in a new issue