84 lines
2.7 KiB
Lua
84 lines
2.7 KiB
Lua
--[[
|
|
Copyright 2023 Oscar Wallberg
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
https://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
]]
|
|
|
|
return {
|
|
cmd = { "gopls", "serve" },
|
|
-- https://github.com/golang/tools/blob/master/gopls/doc/settings.md
|
|
settings = {
|
|
gopls = {
|
|
gofumpt = true,
|
|
codelenses = {
|
|
gc_details = true,
|
|
generate = true,
|
|
regenerate_cgo = true,
|
|
run_vulncheck_exp = true,
|
|
tidy = true,
|
|
upgrade_dependency = true,
|
|
vendor = true
|
|
},
|
|
usePlaceholders = true,
|
|
analyses = {
|
|
asmdecl = true,
|
|
assign = true,
|
|
atomic = true,
|
|
atomicalign = true,
|
|
bools = true,
|
|
buildtag = true,
|
|
cgocall = true,
|
|
composites = true,
|
|
copylocks = true,
|
|
deepequalerrors = true,
|
|
embed = true,
|
|
errorsas = true,
|
|
fieldalignment = true,
|
|
httpresponse = true,
|
|
ifaceassert = true,
|
|
infertypeargs = true,
|
|
loopclosure = true,
|
|
lostcancel = true,
|
|
nilfunc = true,
|
|
nilness = true,
|
|
printf = true,
|
|
shadow = true,
|
|
shift = true,
|
|
simplifycompositelit = true,
|
|
simplifyrange = true,
|
|
simplifyslice = true,
|
|
sortslice = true,
|
|
stdmethods = true,
|
|
stringintconv = true,
|
|
structtag = true,
|
|
testinggoroutine = true,
|
|
tests = true,
|
|
timeformat = true,
|
|
unmarshal = true,
|
|
unreachable = true,
|
|
unsafeptr = true,
|
|
unusedparams = true,
|
|
unusedresult = true,
|
|
unusedwrite = true,
|
|
useany = true,
|
|
fillreturns = true,
|
|
nonewvars = true,
|
|
noresultvalues = true,
|
|
undeclaredname = true,
|
|
unusedvariable = true,
|
|
fillstruct = true,
|
|
stubmethods = true
|
|
}
|
|
}
|
|
}
|
|
} |