feat: some go changes

This commit is contained in:
Kyren223
2024-10-13 19:45:25 +03:00
parent 15cf35b8bf
commit 65ed2febb5
5 changed files with 11 additions and 7 deletions

View File

@@ -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

View File

@@ -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,

View File

@@ -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 = {

View File

@@ -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

View File

@@ -6,7 +6,7 @@ return {
lint.linters_by_ft = {
c = { 'clangtidy' },
cpp = { 'clangtidy' },
-- go = { 'golangci-lint' },
go = { 'golangcilint' },
python = { 'flake8' },
json = { 'jsonlint' },
bash = { 'shellcheck' },