feat: some go changes
This commit is contained in:
@@ -1 +1,5 @@
|
||||
vim.opt_local.expandtab = false
|
||||
-- Tab
|
||||
vim.opt_local.expandtab = false -- convert tabs to spaces
|
||||
vim.opt_local.tabstop = 4 -- number of visual spaces per TAB
|
||||
vim.opt_local.softtabstop = 4 -- number of idfk tab when editing
|
||||
vim.opt_local.shiftwidth = 4 -- number of spaces to insert on tab
|
||||
|
||||
@@ -67,7 +67,7 @@ vim.api.nvim_create_autocmd({ 'BufEnter', 'TextChanged', 'InsertLeave' }, {
|
||||
local text = vim.api.nvim_buf_get_text(bufnr, start_row, start_col, end_row, end_col, {})[1]
|
||||
|
||||
-- Highlight only the parts matching `%[a-z]`
|
||||
for match_start, match_end in text:gmatch('()%%[a-z]()') do
|
||||
for match_start, match_end in text:gmatch('()%%[a-zT]()') do
|
||||
vim.api.nvim_buf_add_highlight(
|
||||
bufnr,
|
||||
-1,
|
||||
|
||||
@@ -85,12 +85,12 @@ return {
|
||||
vendor = true,
|
||||
},
|
||||
hints = {
|
||||
assignVariableTypes = true,
|
||||
compositeLiteralFields = true,
|
||||
assignVariableTypes = false,
|
||||
compositeLiteralFields = false,
|
||||
compositeLiteralTypes = true,
|
||||
constantValues = true,
|
||||
functionTypeParameters = true,
|
||||
-- parameterNames = true,
|
||||
parameterNames = false,
|
||||
rangeVariableTypes = true,
|
||||
},
|
||||
analyses = {
|
||||
|
||||
@@ -25,7 +25,7 @@ return {
|
||||
'isort', -- python formatter for imports
|
||||
'flake8', -- python linter
|
||||
'gofumpt', -- go formatter
|
||||
'golangci-lint', -- go linter
|
||||
-- 'golangci-lint', -- go linter
|
||||
'prettierd', -- multi-lang formatter
|
||||
'prettier', -- prettierd but slower, used as a fallback
|
||||
'jq', -- json formatter
|
||||
|
||||
@@ -6,7 +6,7 @@ return {
|
||||
lint.linters_by_ft = {
|
||||
c = { 'clangtidy' },
|
||||
cpp = { 'clangtidy' },
|
||||
-- go = { 'golangci-lint' },
|
||||
go = { 'golangcilint' },
|
||||
python = { 'flake8' },
|
||||
json = { 'jsonlint' },
|
||||
bash = { 'shellcheck' },
|
||||
|
||||
Reference in New Issue
Block a user