Skip to content

ArmandXiao/nvim-lua

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Neovim config - lua

Rewrite init.vim from ArmandXiao/vim to init.lua

Quick installation

git clone https://github.com/ArmandXiao/nvim-lua.git ~/.config/nvim

Where to place

for *nix users

  • place it under ~/.config~

Structure

  • init.lua is going to require() lua files from lua folders.
  • plugin folder is auto-generated by packer plugin manager

LSP

JAVA

jdtls-launcher

For easy use of java lsp

Follow instructions at jdtls-launcher Recommanded

Automatic installation

curl https://raw.githubusercontent.com/eruizc-dev/jdtls-launcher/master/install.sh | bash

# .bashrc, .zshrc or whatever shell you use
export PATH=$PATH:$HOME/.local/bin

then setup at lsp-setup.lua

require'lspconfig'.jdtls.setup{
   cmd = { 'jdtls' },
   root_dir = function(fname)
      return require'lspconfig'.util.root_pattern('pom.xml', 'gradle.build', '.git')(fname) or vim.fn.getcwd()
   end
}

nvim-jdtls Installation

YOUTUBE: how to configue nvim-lsp | From scratch

  • first add it to plugin.lua
  • go jdtls bin download one
  • then tar zxvf jdtls-bin to place you want
  • Follow instructions on nvim-jdtls
    • create a jdtls-launch bash, then add it to $PATH a simple way is to
    sudo chmod +x jdtls-launch
    sudo cp jdtls-launch /usr/bin
    jdtls-launch
    

Signature help


require('lspconfig').jdtls.setup{
    settings = {
      java = {signatureHelp = {enabled = true}, contentProvider = {preferred = 'fernflower'}}
    },
    on_init = function(client)
      if client.config.settings then
        client.notify('workspace/didChangeConfiguration', {settings = client.config.settings})
      end
    end,
    ...
}

Q: Why do we want to rewrite init.vim? A: Why not?

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published