From 3974ab5bb40458b3ad30db539e033c846cea12b3 Mon Sep 17 00:00:00 2001 From: fiplox Date: Tue, 3 Jan 2023 16:13:42 +0100 Subject: [PATCH] cleanup --- lua/plugins/lsp/init.lua | 4 ++-- lua/plugins/mason.lua | 42 +++++++++++++++++++-------------------- lua/plugins/telescope.lua | 27 +++++++++++++------------ 3 files changed, 37 insertions(+), 36 deletions(-) diff --git a/lua/plugins/lsp/init.lua b/lua/plugins/lsp/init.lua index 0e47a12..f55d5dd 100644 --- a/lua/plugins/lsp/init.lua +++ b/lua/plugins/lsp/init.lua @@ -5,7 +5,7 @@ local M = { dependencies = { 'hrsh7th/cmp-nvim-lsp' }, } -M.tools = { +local tools = { 'clangd', 'gopls', 'sumneko_lua', @@ -81,7 +81,7 @@ function M.config() -- util.info(client.name .. " " .. (enable and "yes" or "no"), "format") client.server_capabilities.documentFormattingProvider = enable end - for _, tool in ipairs(M.tools) do + for _, tool in ipairs(tools) do opts = { on_attach = on_attach, capabilities = capabilities, diff --git a/lua/plugins/mason.lua b/lua/plugins/mason.lua index c77d1b3..a46c821 100644 --- a/lua/plugins/mason.lua +++ b/lua/plugins/mason.lua @@ -3,28 +3,28 @@ local M = { cmd = 'Mason', } -M.tools = { - 'clang-format', - 'clangd', - 'gopls', - -- 'lua-language-server', - 'rust-analyzer', - 'prettierd', - -- 'stylua', - 'shellcheck', - 'shfmt', - 'black', -} +-- M.tools = { +-- 'clang-format', +-- 'clangd', +-- 'gopls', +-- -- 'lua-language-server', +-- 'rust-analyzer', +-- 'prettierd', +-- -- 'stylua', +-- 'shellcheck', +-- 'shfmt', +-- 'black', +-- } -function M.check() - local mr = require 'mason-registry' - for _, tool in ipairs(M.tools) do - local p = mr.get_package(tool) - if not p:is_installed() then - p:install() - end - end -end +-- function M.check() +-- local mr = require 'mason-registry' +-- for _, tool in ipairs(M.tools) do +-- local p = mr.get_package(tool) +-- if not p:is_installed() then +-- p:install() +-- end +-- end +-- end function M.config() require('mason').setup { diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index 29372b4..0ac95de 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -1,16 +1,16 @@ -local function project_files() - local opts = {} - if vim.loop.fs_stat '.git' then - opts.show_untracked = true - require('telescope.builtin').git_files(opts) - else - local client = vim.lsp.get_active_clients()[1] - if client then - opts.cwd = client.config.root_dir - end - require('telescope.builtin').find_files(opts) - end -end +-- local function project_files() +-- local opts = {} +-- if vim.loop.fs_stat '.git' then +-- opts.show_untracked = true +-- require('telescope.builtin').git_files(opts) +-- else +-- local client = vim.lsp.get_active_clients()[1] +-- if client then +-- opts.cwd = client.config.root_dir +-- end +-- require('telescope.builtin').find_files(opts) +-- end +-- end local M = { 'nvim-telescope/telescope.nvim', @@ -45,6 +45,7 @@ function M.config() telescope.setup { pickers = { find_files = { + find_command = { 'fd', '--type', 'f', '--strip-cwd-prefix' }, theme = 'dropdown', }, live_grep = {