updates
This commit is contained in:
parent
d5bfc57e35
commit
893c861476
@ -70,16 +70,6 @@ function Toggleln()
|
||||
end
|
||||
end
|
||||
|
||||
---- trim whitespace on save
|
||||
autocmd("BufWritePre", {
|
||||
pattern = "*",
|
||||
callback = function()
|
||||
vim.cmd([[:%s/\s\+$//e]])
|
||||
end,
|
||||
once = false,
|
||||
group = _group,
|
||||
})
|
||||
|
||||
-- change tmux title
|
||||
autocmd("BufReadPost", {
|
||||
pattern = "*",
|
||||
@ -150,6 +140,3 @@ autocmd('BufUnload', {
|
||||
vim.opt.cmdheight = 1
|
||||
end,
|
||||
})
|
||||
|
||||
-- syntax fix
|
||||
vim.cmd("syntax sync fromstart")
|
||||
|
@ -15,6 +15,7 @@ vim.keymap.set('n', '<space>q', vim.diagnostic.setloclist, opts)
|
||||
-- Use an on_attach function to only map the following keys
|
||||
-- after the language server attaches to the current buffer
|
||||
local on_attach = function(client, bufnr)
|
||||
vim.cmd [[autocmd BufWritePre * lua vim.lsp.buf.format()]]
|
||||
-- Enable completion triggered by <c-x><c-o>
|
||||
vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
|
||||
if client.server_capabilities.colorProvider then
|
||||
|
@ -30,20 +30,19 @@ return require('packer').startup({ function(use)
|
||||
|
||||
use 'ray-x/guihua.lua'
|
||||
|
||||
use {
|
||||
'ray-x/go.nvim',
|
||||
ft = { "go" },
|
||||
use 'ctrlpvim/ctrlp.vim'
|
||||
|
||||
use({
|
||||
'fatih/vim-go',
|
||||
config = function()
|
||||
require("go").setup({
|
||||
max_line_len = 120,
|
||||
tag_transform = false,
|
||||
test_dir = '',
|
||||
comment_placeholder = ' ',
|
||||
lsp_cfg = true, -- false: use your own lspconfig
|
||||
dap_debug = true,
|
||||
})
|
||||
vim.g.go_fmt_command = "gofumpt"
|
||||
vim.g.go_highlight_types = 1
|
||||
vim.g.go_highlight_fields = 1
|
||||
vim.g.go_highlight_functions = 1
|
||||
vim.g.go_highlight_function_calls = 1
|
||||
vim.g.go_auto_type_info = 1
|
||||
end
|
||||
}
|
||||
})
|
||||
|
||||
-- obsession
|
||||
use 'tpope/vim-obsession'
|
||||
|
Loading…
Reference in New Issue
Block a user