Created
May 19, 2023 19:42
-
-
Save mortymacs/7a5c2747fe469070aae4e8cb46fbc100 to your computer and use it in GitHub Desktop.
Attach LSP if current directory has "go.mod" file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local Path = require("plenary.path") | |
local lsp = require("lspconfig") | |
if Path:new("go.mod"):exists() then | |
print("load go") | |
lsp.gopls.setup() | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment