<commit_before>" Copyright 2013 The Go Authors. All rights reserved.
" Use of this source code is governed by a BSD-style
" license that can be found in the LICENSE file.
"
" go.vim: Vim filetype plugin for Go.

if exists("b:did_ftplugin")
    finish
endif
let b:did_ftplugin = 1

if !exists("g:go_auto_type_info")
    let g:go_auto_type_info = 0
endif

setlocal formatoptions-=t

setlocal comments=s1:/*,mb:*,ex:*/,://
setlocal commentstring=//\ %s

setlocal noexpandtab

compiler go

if !exists("g:go_doc_keywordprg_enabled")
    let g:go_doc_keywordprg_enabled = 1
endif
if g:go_doc_keywordprg_enabled
    " keywordprg doesn't allow to use vim commands, override it
    nnoremap <buffer> <silent> K :GoDoc<cr> 
endif


if !exists("g:go_def_mapping_enabled")
    let g:go_def_mapping_enabled = 1
endif
if g:go_def_mapping_enabled
   nnoremap <buffer> <silent> gd :GoDef<cr>
endif


let b:undo_ftplugin = "setl fo< com< cms<"

" Set gocode completion
setlocal omnifunc=go#complete#Complete

" GoInfo automatic update
if g:go_auto_type_info != 0
    setlocal updatetime=300
    au! CursorHold *.go nested call go#complete#Info()
endif


" autoload settings
if !exists('g:go_fmt_autosave')
    let g:go_fmt_autosave = 1
endif

if g:go_fmt_autosave
    autocmd BufWritePre <buffer> call go#fmt#Format(-1)
endif

" vim:ts=4:sw=4:et<commit_msg>Refactoring: use the "get" function to retrieve user settings<commit_after>" Copyright 2013 The Go Authors. All rights reserved.
" Use of this source code is governed by a BSD-style
" license that can be found in the LICENSE file.
"
" go.vim: Vim filetype plugin for Go.

if exists("b:did_ftplugin")
    finish
endif
let b:did_ftplugin = 1

let b:undo_ftplugin = "setl fo< com< cms<"

setlocal formatoptions-=t

setlocal comments=s1:/*,mb:*,ex:*/,://
setlocal commentstring=//\ %s

setlocal noexpandtab

compiler go

" Set gocode completion
setlocal omnifunc=go#complete#Complete

if get(g:, "go_doc_keywordprg_enabled", 1)
    " keywordprg doesn't allow to use vim commands, override it
    nnoremap <buffer> <silent> K :GoDoc<cr>
endif

if get(g:, "go_def_mapping_enabled", 1)
   nnoremap <buffer> <silent> gd :GoDef<cr>
endif

" GoInfo automatic update
if get(g:, "go_auto_type_info", 0)
    setlocal updatetime=300
    au! CursorHold *.go nested call go#complete#Info()
endif

" autoload settings
if get(g:, "go_fmt_autosave", 1)
    autocmd BufWritePre <buffer> call go#fmt#Format(-1)
endif

" vim:ts=4:sw=4:et
{'fraction_non_alphanumeric': 0.1054989816700611, 'fraction_numerical': 0.013441955193482688, 'mean_word_length': 4.778823529411765, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4284232', 'n_tokens_mistral': 937, 'n_tokens_neox': 900, 'n_words': 266}