add go support
This commit is contained in:
8
flake.lock
generated
8
flake.lock
generated
@@ -77,16 +77,16 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1686059680,
|
||||
"narHash": "sha256-sp0WlCIeVczzB0G8f8iyRg3IYW7KG31mI66z7HIZwrI=",
|
||||
"lastModified": 1687193290,
|
||||
"narHash": "sha256-3bknptEbd9LLlCiFRFkMwmciHB+QXET41gH/RX+Nr1A=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "a558f7ac29f50c4b937fb5c102f587678ae1c9fb",
|
||||
"rev": "ad157fe26e74211e7dde0456cb3fd9ab78b6e552",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "release-23.05",
|
||||
"ref": "nixos-23.05",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
description = "NVIM Configuration";
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/release-23.05";
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
groovyls.url = "github:miknikif/groovyls";
|
||||
groovyls.inputs.nixpkgs.follows = "nixpkgs";
|
||||
@@ -65,6 +65,10 @@
|
||||
jdk11 # for groovy
|
||||
groovy
|
||||
pkgs.groovyls # groovy lsp
|
||||
go # go itself
|
||||
golangci-lint # go lint
|
||||
golangci-lint-langserver # go lint
|
||||
gopls # google go lsp
|
||||
];
|
||||
neovim-augmented = recursiveMerge [
|
||||
pkgs.neovim-unwrapped
|
||||
|
||||
@@ -48,6 +48,12 @@ M.config = function()
|
||||
callback = function() require('pwnvim.filetypes').groovy() end,
|
||||
group = filetypes
|
||||
})
|
||||
autocmd("FileType",
|
||||
{
|
||||
pattern = { "go", "gomod", "gowork", "gotmpl" },
|
||||
callback = function() require('pwnvim.filetypes').go() end,
|
||||
group = filetypes
|
||||
})
|
||||
autocmd("FileType",
|
||||
{
|
||||
pattern = { "md", "markdown", "vimwiki" },
|
||||
@@ -103,6 +109,11 @@ M.groovy = function()
|
||||
require('pwnvim.options').fourspaceindent()
|
||||
end
|
||||
|
||||
M.go = function()
|
||||
require('pwnvim.options').programming()
|
||||
require('pwnvim.options').fourspaceindent()
|
||||
end
|
||||
|
||||
M.page = function()
|
||||
-- disable status bar -- handled in config
|
||||
-- map space to ctrl-f
|
||||
|
||||
@@ -352,10 +352,12 @@ M.diagnostics = function(groovyls_cmd, groovy_lsp_settings)
|
||||
},
|
||||
capabilities = capabilities
|
||||
}
|
||||
lspconfig.terraformls.setup { on_attach = attached, capabilities = capabilities } -- terraform lsp
|
||||
lspconfig.tflint.setup { on_attach = attached, capabilities = capabilities } -- terraform lsp
|
||||
lspconfig.terraformls.setup { on_attach = attached, capabilities = capabilities } -- terraform lsp
|
||||
lspconfig.tflint.setup { on_attach = attached, capabilities = capabilities } -- terraform lsp
|
||||
lspconfig.groovyls.setup { on_attach = attached, capabilities = capabilities, cmd = groovyls_cmd, settings =
|
||||
groovy_lsp_settings } -- groovy lsp
|
||||
groovy_lsp_settings } -- groovy lsp
|
||||
lspconfig.golangci_lint_ls.setup { capabilities = capabilities, on_attach = attached } -- go support
|
||||
lspconfig.gopls.setup { capabilities = capabilities, on_attach = attached } -- go support
|
||||
|
||||
require 'lspsaga'.init_lsp_saga({
|
||||
use_saga_diagnostic_sign = not SimpleUI,
|
||||
|
||||
Reference in New Issue
Block a user