From de562a021812721db316db5511d95e12259c0e2c Mon Sep 17 00:00:00 2001 From: Rikuoh Tsujitani Date: Wed, 25 Dec 2024 16:29:53 +0900 Subject: [PATCH] =?UTF-8?q?none-ls.nvim=E3=81=AF=E3=81=97=E3=81=B0?= =?UTF-8?q?=E3=82=89=E3=81=8F6be90f8cf37d7f50a89b7229412f6184b16f1b28?= =?UTF-8?q?=E3=81=AE=E3=83=90=E3=83=BC=E3=82=B8=E3=83=A7=E3=83=B3=E3=82=92?= =?UTF-8?q?=E4=BD=BF=E3=81=86=E3=81=93=E3=81=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- init.lua | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/init.lua b/init.lua index ea26110..bf5e995 100644 --- a/init.lua +++ b/init.lua @@ -176,7 +176,13 @@ require("lazy").setup({ { "jay-babu/mason-null-ls.nvim", event = "LspAttach" }, { "jay-babu/mason-nvim-dap.nvim", event = "LspAttach" }, { "neovim/nvim-lspconfig", event = "BufReadPre" }, - { "nvimtools/none-ls.nvim", event = "LspAttach" }, + { + "nvimtools/none-ls.nvim", + dependencies = { + "nvimtools/none-ls-extras.nvim", + }, + event = "LspAttach", + }, { "mfussenegger/nvim-dap", event = "LspAttach" }, { "rcarriga/nvim-dap-ui", event = "LspAttach" }, { "nvim-neotest/nvim-nio", event = "LspAttach" }, @@ -434,11 +440,18 @@ require("mason-lspconfig").setup_handlers({ }) --none-ls -local status, null_ls = pcall(require, "null-ls") -if not status then - return -end -null_ls.setup() +local null_ls = require("null-ls") + +null_ls.setup({ + sources = { + null_ls.builtins.formatting.stylua, + null_ls.builtins.formatting.prettierd, + null_ls.builtins.diagnostics.rubocop, + null_ls.builtins.formatting.rubocop, + require("none-ls.diagnostics.eslint"), + }, +}) + vim.keymap.set("n", "p", function() vim.lsp.buf.format({ async = true }) end) @@ -467,7 +480,7 @@ map( map("n", "d", ":lua require'dapui'.toggle()", { silent = true }) map("n", "d", ":lua require'dapui'.eval()", { silent = true }) ----DAP-UI +--DAP-UI require("dapui").setup({ icons = { expanded = "▾", collapsed = "▸", current_frame = "▸" }, mappings = { @@ -527,7 +540,7 @@ require("dapui").setup({ }, }) ----jaq-nvim +--jaq-nvim require("jaq-nvim").setup({ cmds = { internal = { @@ -666,7 +679,7 @@ cmp.setup({ --nvim-treesitter require("nvim-treesitter.configs").setup({ highlight = { - enable = true, + enable = enable, disable = { "help", "markdown", "toml" }, }, refactor = {