diff --git a/init.lua b/init.lua index a5eacbe9..1362e380 100644 --- a/init.lua +++ b/init.lua @@ -690,14 +690,7 @@ require('lazy').setup({ bashls = {}, jsonls = {}, yamlls = {}, - ty = { - configuration = { - rules = { - ['unresolved-reference'] = 'warn', - diagnosticMode = 'workspace', - }, - }, - }, + ruff = {}, -- rust_analyzer = {}, -- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs -- @@ -740,7 +733,6 @@ require('lazy').setup({ local ensure_installed = vim.tbl_keys(servers or {}) vim.list_extend(ensure_installed, { 'stylua', -- Used to format Lua code - 'ruff', }) require('mason-tool-installer').setup { ensure_installed = ensure_installed } @@ -752,7 +744,7 @@ require('lazy').setup({ 'solargraph', 'bashls', 'lua_ls', - 'ty', + 'ruff', }, -- explicitly set to an empty table (Kickstart populates installs via mason-tool-installer) automatic_installation = false, handlers = { @@ -802,14 +794,6 @@ require('lazy').setup({ formatters_by_ft = { lua = { 'stylua' }, go = { 'gofmt' }, - python = { - -- To fix auto-fixable lint errors. - 'ruff_fix', - -- To run the Ruff formatter. - 'ruff_format', - -- To organize the imports. - 'ruff_organize_imports', - }, -- Conform can also run multiple formatters sequentially -- python = { "isort", "black" }, -- @@ -997,7 +981,23 @@ require('lazy').setup({ main = 'nvim-treesitter.configs', -- Sets main module to use for opts -- [[ Configure Treesitter ]] See `:help nvim-treesitter` opts = { - ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc', 'go', 'yaml', 'json' }, + ensure_installed = { + 'bash', + 'c', + 'diff', + 'html', + 'lua', + 'luadoc', + 'markdown', + 'markdown_inline', + 'query', + 'vim', + 'vimdoc', + 'go', + 'yaml', + 'json', + 'python', + }, -- Autoinstall languages that are not installed auto_install = true, highlight = { diff --git a/lua/custom/plugins/golang.lua b/lua/custom/plugins/golang.lua new file mode 100644 index 00000000..2ea6462f --- /dev/null +++ b/lua/custom/plugins/golang.lua @@ -0,0 +1,70 @@ +return { + { + 'olexsmir/gopher.nvim', + ft = 'go', + -- branch = "develop" + -- (optional) updates the plugin's dependencies on each update + build = function() + vim.cmd.GoInstallDeps() + end, + ---@module "gopher" + ---@type gopher.Config + opts = {}, + config = function() + require('gopher').setup { + -- log level, you might consider using DEBUG or TRACE for debugging the plugin + log_level = vim.log.levels.INFO, + + -- timeout for running internal commands + timeout = 2000, + + -- timeout for running installer commands(e.g :GoDepsInstall, :GoDepsInstallSync) + installer_timeout = 999999, + + -- user specified paths to binaries + commands = { + go = 'go', + gomodifytags = 'gomodifytags', + gotests = 'gotests', + impl = 'impl', + iferr = 'iferr', + }, + gotests = { + -- a default template that gotess will use. + -- gotets doesn't have template named `default`, we use it to represent absence of the provided template. + template = 'default', + + -- path to a directory containing custom test code templates + template_dir = nil, + + -- use named tests(map with test name as key) in table tests(slice of structs by default) + named = false, + }, + gotag = { + transform = 'snakecase', + + -- default tags to add to struct fields + default_tag = 'json', + + -- default tag option added struct fields, set to nil to disable + -- e.g: `option = "json=omitempty,xml=omitempty` + option = nil, + }, + iferr = { + -- choose a custom error message, nil to use default + -- e.g: `message = 'fmt.Errorf("failed to %w", err)'` + message = nil, + }, + json2go = { + -- command used to open interactive input. + -- e.g: `split`, `botright split`, `tabnew` + interactive_cmd = 'vsplit', + + -- name of autogenerated struct + -- e.g: "MySuperCoolName" + type_name = nil, + }, + } + end, + }, +} diff --git a/lua/kickstart/plugins/lint.lua b/lua/kickstart/plugins/lint.lua index ecdf36f4..dec42f09 100644 --- a/lua/kickstart/plugins/lint.lua +++ b/lua/kickstart/plugins/lint.lua @@ -7,7 +7,6 @@ return { local lint = require 'lint' lint.linters_by_ft = { markdown = { 'markdownlint' }, - python = { 'ruff' }, } -- To allow other plugins to add linters to require('lint').linters_by_ft,