mirror of
https://github.com/dcarrillo/dotfiles.git
synced 2024-12-22 18:38:00 +00:00
[neovim] Minor fixes
This commit is contained in:
parent
89f28aba90
commit
2fc006ba85
@ -16,7 +16,7 @@ vim.api.nvim_create_autocmd({ "TextYankPost" }, {
|
||||
|
||||
-- Set expandtab=true in several file types
|
||||
vim.api.nvim_create_autocmd({ "FileType" }, {
|
||||
pattern = { "go", "makefile", "lua" },
|
||||
pattern = { "*.go", "makefile", "*.lua" },
|
||||
callback = function()
|
||||
vim.opt_local.expandtab = false
|
||||
end,
|
||||
@ -24,7 +24,7 @@ vim.api.nvim_create_autocmd({ "FileType" }, {
|
||||
|
||||
-- Use 'q' to quit from common plugins
|
||||
vim.api.nvim_create_autocmd({ "FileType" }, {
|
||||
pattern = { "qf", "help", "man", "lspinfo", "spectre_panel", "lir" },
|
||||
pattern = { "qf", "help", "man", "lspinfo" },
|
||||
callback = function()
|
||||
vim.cmd([[
|
||||
nnoremap <silent> <buffer> q :close<CR>
|
||||
|
@ -3,7 +3,10 @@ if not status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
vim.cmd("autocmd FileType go nmap <Leader>gf :lua require('go.format').goimport()<CR>")
|
||||
go.setup({
|
||||
icons = { breakpoint = "", currentpos = "🏃" },
|
||||
fillstruct = "fillstruct",
|
||||
})
|
||||
|
||||
vim.cmd("autocmd FileType go nmap <Leader>gf :lua require('go.format').goimport()<CR>")
|
||||
vim.api.nvim_exec([[ autocmd BufWritePre *.go :silent! lua require('go.format').goimport() ]], false)
|
||||
|
Loading…
Reference in New Issue
Block a user