Coder Social home page Coder Social logo

spring-boot.nvim's Introduction

English

Spring Boot Nvim

参考 VScode Spring Boot 插件, 将它的部分功能集成到 Neovim 中。

  • 查找使用了 Spring 注解的 Bean
  • 查找 Web Endpoints。
  • application.properties, application.yml 文件补全提示, 以及跳转。
  • 代码片段补全。
  • Code Action

部分功能可能不完整,欢迎提交 PR。

安装

  • lazy.nvim
      {
        "JavaHello/spring-boot.nvim",
        ft = "java",
        dependencies = {
          "mfussenegger/nvim-jdtls", -- or nvim-java, nvim-lspconfig
          "ibhagwan/fzf-lua", -- 可选
        },
      }
  • Visual Studio Code 中安装VScode Spring Boot(可选的)

配置

spring-boot.nvim

  require('spring_boot').setup({})
  • 默认配置
      vim.g.spring_boot = {
        jdt_extensions_path = nil, -- 默认使用 ~/.vscode/extensions/vmware.vscode-spring-boot-x.xx.x
        jdt_extensions_jars = {
          "io.projectreactor.reactor-core.jar",
          "org.reactivestreams.reactive-streams.jar",
          "jdt-ls-commons.jar",
          "jdt-ls-extension.jar",
        },
      }
      require('spring_boot').setup({
        ls_path = nil, -- 默认使用 ~/.vscode/extensions/vmware.vscode-spring-boot-x.xx.x
        jdtls_name = "jdtls",
        log_file = nil,
      })

nvim-jdtls

详细配置参考nvim-jdtls项目

local jdtls_config = {
  bundles = {}
}
-- 添加 spring-boot jdtls 扩展 jar 包
vim.list_extend(jdtls_config.bundles, require("spring_boot").java_extensions())

nvim-lspconfig

require('spring_boot').init_lsp_commands()
require("lspconfig").jdtls.setup {
  init_options = {
    bundles = require("spring_boot").java_extensions(),
  },
}

使用

  • 查找使用了 Spring 注解的 Bean
    :FzfLua lsp_live_workspace_symbols
    lsp_live_workspace_symbols

spring-boot.nvim's People

Contributors

javahello avatar eslam-allam avatar

Stargazers

Sango avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.