|
@@ -25,6 +25,9 @@ if O.json.autoformat then table.insert(auto_formatters, json_format) end
|
|
local ruby_format = {'BufWritePre', '*.rb', 'lua vim.lsp.buf.formatting_sync(nil,1000)'}
|
|
local ruby_format = {'BufWritePre', '*.rb', 'lua vim.lsp.buf.formatting_sync(nil,1000)'}
|
|
if O.ruby.autoformat then table.insert(auto_formatters, ruby_format) end
|
|
if O.ruby.autoformat then table.insert(auto_formatters, ruby_format) end
|
|
|
|
|
|
|
|
+local go_format = {'BufWritePre', '*.go', 'lua vim.lsp.buf.formatting_sync(nil,1000)'}
|
|
|
|
+if O.go.autoformat then table.insert(auto_formatters, go_format) end
|
|
|
|
+
|
|
utils.define_augroups({
|
|
utils.define_augroups({
|
|
_general_settings = {
|
|
_general_settings = {
|
|
{'TextYankPost', '*', 'lua require(\'vim.highlight\').on_yank({higroup = \'Search\', timeout = 200})'},
|
|
{'TextYankPost', '*', 'lua require(\'vim.highlight\').on_yank({higroup = \'Search\', timeout = 200})'},
|
|
@@ -40,6 +43,13 @@ utils.define_augroups({
|
|
{'FileType', 'java', 'luafile ~/.config/nvim/lua/lsp/java-ls.lua'},
|
|
{'FileType', 'java', 'luafile ~/.config/nvim/lua/lsp/java-ls.lua'},
|
|
{'FileType', 'java', 'nnoremap ca <Cmd>lua require(\'jdtls\').code_action()<CR>'}
|
|
{'FileType', 'java', 'nnoremap ca <Cmd>lua require(\'jdtls\').code_action()<CR>'}
|
|
},
|
|
},
|
|
|
|
+ _go = {
|
|
|
|
+ -- Go generally requires Tabs instead of spaces.
|
|
|
|
+ {'FileType', 'go', 'setlocal tabstop=4'},
|
|
|
|
+ {'FileType', 'go', 'setlocal shiftwidth=4'},
|
|
|
|
+ {'FileType', 'go', 'setlocal softtabstop=4'},
|
|
|
|
+ {'FileType', 'go', 'setlocal noexpandtab'},
|
|
|
|
+ },
|
|
_dashboard = {
|
|
_dashboard = {
|
|
-- seems to be nobuflisted that makes my stuff disapear will do more testing
|
|
-- seems to be nobuflisted that makes my stuff disapear will do more testing
|
|
{
|
|
{
|