-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial configuration for golang editing
- Loading branch information
1 parent
8fa4748
commit 2f8e6a0
Showing
8 changed files
with
77 additions
and
37 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,6 @@ | ||
-- This file needs to have same structure as nvconfig.lua | ||
-- https://github.com/NvChad/NvChad/blob/v2.5/lua/nvconfig.lua | ||
|
||
---@type ChadrcConfig | ||
local M = {} | ||
|
||
M.ui = { | ||
theme = "everblush", | ||
|
||
-- hl_override = { | ||
-- Comment = { italic = true }, | ||
-- ["@comment"] = { italic = true }, | ||
-- }, | ||
} | ||
M.ui = {theme = "everblush"} | ||
M.plugins = 'plugins' | ||
|
||
return M |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
local null_ls = require("null-ls") | ||
local augroup = vim.api.nvim_create_augroup("LspFormatting", {}) | ||
|
||
local opts = { | ||
sources = { | ||
null_ls.builtins.formatting.gofmt, | ||
null_ls.builtins.formatting.goimports, | ||
}, | ||
on_attach = function(client, bufnr) | ||
if client.supports_method("textDocument/formatting") then | ||
vim.api.nvim_clear_autocmds({ | ||
group = augroup, | ||
buffer = bufnr, | ||
}) | ||
vim.api.nvim_create_autocmd("BufWritePre", { | ||
group = augroup, | ||
buffer = bufnr, | ||
callback = function() | ||
vim.lsp.buf.format({ bufnr = bufnr }) | ||
end, | ||
}) | ||
end | ||
end, | ||
} | ||
|
||
return opts |
This file was deleted.
Oops, something went wrong.
Empty 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
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