[mirror] Make your go dev experience better github.com/olexsmir/gopher.nvim
neovim golang

add deprecation message (#67)

authored by olexsmir.xyz and committed by GitHub af1d5d16 fbf6441f

Changed files
+11 -2
lua
gopher
+2
README.md
··· 220 220 <b>Setup <a href="https://github.com/mfussenegger/nvim-dap">nvim-dap</a> for go in one line</b> 221 221 </summary> 222 222 223 + THIS FEATURE WILL BE REMOVED IN `0.1.6` 224 + 223 225 note [nvim-dap](https://github.com/mfussenegger/nvim-dap) has to be installed 224 226 225 227 ```lua
+9 -2
lua/gopher/dap.lua
··· 3 3 ---@text This module sets up `nvim-dap` for Go. 4 4 ---@usage just call `require("gopher.dap").setup()`, and you're good to go. 5 5 6 - local u = require "gopher._utils" 7 6 local c = require "gopher.config" 8 7 local dap = {} 9 8 ··· 113 112 114 113 -- sets ups nvim-dap for Go in one function call. 115 114 function dap.setup() 116 - local d = u.sreq "dap" 115 + vim.deprecate( 116 + "gopher.dap", 117 + "you might consider setting up `nvim-dap` manually, or using another plugin(https://github.com/leoluz/nvim-dap-go)", 118 + "v0.1.6", 119 + "gopher" 120 + ) 121 + 122 + local ok, d = pcall(require, "dap") 123 + assert(ok, "gopher.nvim dependency error: dap not installed") 117 124 118 125 d.adapters.go = dap.adapter 119 126 d.configurations.go = dap.configuration