minor refactoring
moved the lsp.signature to ui repo to be available for non-nvchad users too
This commit is contained in:
parent
61b336c030
commit
230b6c867e
@ -1,3 +1,5 @@
|
||||
dofile(vim.g.base46_cache .. "git")
|
||||
|
||||
local options = {
|
||||
signs = {
|
||||
add = { text = "│" },
|
||||
|
@ -1,9 +1,8 @@
|
||||
local M = {}
|
||||
local map = vim.keymap.set
|
||||
local conf = require("nvconfig").ui.lsp
|
||||
|
||||
-- export on_attach & capabilities
|
||||
M.on_attach = function(client, bufnr)
|
||||
M.on_attach = function(_, bufnr)
|
||||
local function opts(desc)
|
||||
return { buffer = bufnr, desc = "LSP " .. desc }
|
||||
end
|
||||
@ -27,11 +26,6 @@ M.on_attach = function(client, bufnr)
|
||||
|
||||
map({ "n", "v" }, "<leader>ca", vim.lsp.buf.code_action, opts "Code action")
|
||||
map("n", "gr", vim.lsp.buf.references, opts "Show references")
|
||||
|
||||
-- setup signature popup
|
||||
if conf.signature and client.server_capabilities.signatureHelpProvider then
|
||||
require("nvchad.lsp.signature").setup(client, bufnr)
|
||||
end
|
||||
end
|
||||
|
||||
-- disable semanticTokens
|
||||
|
@ -1,5 +1,7 @@
|
||||
dofile(vim.g.base46_cache .. "mason")
|
||||
|
||||
local options = {
|
||||
ensure_installed = { "lua-language-server", 'stylua' }, -- not an option from mason.nvim
|
||||
ensure_installed = { "lua-language-server", "stylua" }, -- not an option from mason.nvim
|
||||
|
||||
PATH = "skip",
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
dofile(vim.g.base46_cache .. "nvimtree")
|
||||
|
||||
local options = {
|
||||
filters = {
|
||||
dotfiles = false,
|
||||
|
@ -1,3 +1,5 @@
|
||||
dofile(vim.g.base46_cache .. "telescope")
|
||||
|
||||
local options = {
|
||||
defaults = {
|
||||
vimgrep_arguments = {
|
||||
|
@ -1,3 +1,6 @@
|
||||
dofile(vim.g.base46_cache .. "syntax")
|
||||
dofile(vim.g.base46_cache .. "treesitter")
|
||||
|
||||
local options = {
|
||||
ensure_installed = { "lua", "luadoc", "printf", "vim", "vimdoc" },
|
||||
|
||||
|
@ -55,7 +55,7 @@ g["loaded_perl_provider"] = 0
|
||||
g["loaded_ruby_provider"] = 0
|
||||
|
||||
-- add binaries installed by mason.nvim to path
|
||||
local is_windows = vim.fn.has("win32") ~= 0
|
||||
local is_windows = vim.fn.has "win32" ~= 0
|
||||
local sep = is_windows and "\\" or "/"
|
||||
local delim = is_windows and ";" or ":"
|
||||
vim.env.PATH = table.concat({vim.fn.stdpath "data", "mason", "bin"}, sep) .. delim .. vim.env.PATH
|
||||
vim.env.PATH = table.concat({ vim.fn.stdpath "data", "mason", "bin" }, sep) .. delim .. vim.env.PATH
|
||||
|
@ -54,7 +54,6 @@ return {
|
||||
return require "nvchad.configs.nvimtree"
|
||||
end,
|
||||
config = function(_, opts)
|
||||
dofile(vim.g.base46_cache .. "nvimtree")
|
||||
require("nvim-tree").setup(opts)
|
||||
end,
|
||||
},
|
||||
@ -92,7 +91,6 @@ return {
|
||||
return require "nvchad.configs.gitsigns"
|
||||
end,
|
||||
config = function(_, opts)
|
||||
dofile(vim.g.base46_cache .. "git")
|
||||
require("gitsigns").setup(opts)
|
||||
end,
|
||||
},
|
||||
@ -105,7 +103,6 @@ return {
|
||||
return require "nvchad.configs.mason"
|
||||
end,
|
||||
config = function(_, opts)
|
||||
dofile(vim.g.base46_cache .. "mason")
|
||||
require("mason").setup(opts)
|
||||
|
||||
-- custom nvchad cmd to install all mason binaries listed
|
||||
@ -194,7 +191,6 @@ return {
|
||||
return require "nvchad.configs.telescope"
|
||||
end,
|
||||
config = function(_, opts)
|
||||
dofile(vim.g.base46_cache .. "telescope")
|
||||
local telescope = require "telescope"
|
||||
telescope.setup(opts)
|
||||
|
||||
@ -228,8 +224,6 @@ return {
|
||||
return require "nvchad.configs.treesitter"
|
||||
end,
|
||||
config = function(_, opts)
|
||||
dofile(vim.g.base46_cache .. "syntax")
|
||||
dofile(vim.g.base46_cache .. "treesitter")
|
||||
require("nvim-treesitter.configs").setup(opts)
|
||||
end,
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user