From 63998c60239f50ec185664cd0ddba60afb8505a0 Mon Sep 17 00:00:00 2001 From: Danny Wigg Date: Sat, 7 Jun 2025 14:49:53 +0100 Subject: [PATCH] include missing tools --- init.lua | 53 ++++++++++++++++++++++++++--------------------------- 1 file changed, 26 insertions(+), 27 deletions(-) diff --git a/init.lua b/init.lua index e66da2e7..04bd5f61 100644 --- a/init.lua +++ b/init.lua @@ -385,28 +385,6 @@ require('lazy').setup({ 'saghen/blink.cmp', }, config = function() - -- Brief aside: **What is LSP?** - -- - -- LSP is an initialism you've probably heard, but might not understand what it is. - -- - -- LSP stands for Language Server Protocol. It's a protocol that helps editors - -- and language tooling communicate in a standardized fashion. - -- - -- In general, you have a "server" which is some tool built to understand a particular - -- language (such as `gopls`, `lua_ls`, `rust_analyzer`, etc.). These Language Servers - -- (sometimes called LSP servers, but that's kind of like ATM Machine) are standalone - -- processes that communicate with some "client" - in this case, Neovim! - -- - -- LSP provides Neovim with features like: - -- - Go to definition - -- - Find references - -- - Autocompletion - -- - Symbol Search - -- - and more! - -- - -- Thus, Language Servers are external tools that must be installed separately from - -- Neovim. This is where `mason` and related plugins come into play. - -- -- If you're wondering about lsp vs treesitter, you can check out the wonderfully -- and elegantly composed help section, `:help lsp-vs-treesitter` @@ -565,7 +543,21 @@ require('lazy').setup({ local servers = { -- clangd = {}, gopls = {}, - pyright = {}, + pyright = { + settings = { + python = { + analysis = { + typeCheckingMode = 'basic', + diagnosticSeverityOverrides = { + reportMissingImports = 'none', -- Ruff will handle lint diagnostics + reportUnusedImport = 'none', -- Ruff handles these + reportUnusedVariable = 'none', + }, + }, + }, + }, + }, + ruff = {}, -- rust_analyzer = {}, -- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs -- @@ -615,6 +607,16 @@ require('lazy').setup({ local ensure_installed = vim.tbl_keys(servers or {}) vim.list_extend(ensure_installed, { 'stylua', -- Used to format Lua code + 'black', + 'isort', + 'ruff', + 'pyright', + 'prettierd', + 'eslint-lsp', + 'typescript-language-server', + 'gopls', + 'gofumpt', + 'goimports', }) require('mason-tool-installer').setup { ensure_installed = ensure_installed } @@ -671,11 +673,9 @@ require('lazy').setup({ javascriptreact = { 'prettierd', stop_after_first = true }, typescript = { 'prettierd', stop_after_first = true }, typescriptreact = { 'prettierd', stop_after_first = true }, - -- Conform can also run multiple formatters sequentially python = { 'isort', 'black' }, - -- + go = { 'goimports', 'gofumpt' }, -- You can use 'stop_after_first' to run the first available formatter from the list - -- javascript = { "prettierd", "prettier", stop_after_first = true }, }, }, }, @@ -862,7 +862,6 @@ require('lazy').setup({ -- NOTE: Next step on your Neovim journey: Add/Configure additional plugins for Kickstart -- -- Here are some example plugins that I've included in the Kickstart repository. - -- Uncomment any of the lines below to enable them (you will need to restart nvim). -- -- require 'kickstart.plugins.debug', -- require 'kickstart.plugins.indent_line',