This commit is contained in:
fiplox 2023-01-03 16:13:42 +01:00
parent fb47b1f896
commit 3974ab5bb4
3 changed files with 37 additions and 36 deletions

View File

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

View File

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

View File

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