mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-23 01:08:59 +02:00
feat(extras): added recommended detectors for all languages
This commit is contained in:
parent
03ea7f6f98
commit
c29213416b
18 changed files with 132 additions and 0 deletions
|
@ -1,4 +1,10 @@
|
||||||
return {
|
return {
|
||||||
|
recommended = function()
|
||||||
|
return LazyVim.extras.wants({
|
||||||
|
ft = "yaml.ansible",
|
||||||
|
root = { "ansible.cfg", ".ansible-lint" },
|
||||||
|
})
|
||||||
|
end,
|
||||||
{
|
{
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
opts = function(_, opts)
|
opts = function(_, opts)
|
||||||
|
|
|
@ -1,4 +1,17 @@
|
||||||
return {
|
return {
|
||||||
|
recommended = function()
|
||||||
|
return LazyVim.extras.wants({
|
||||||
|
ft = { "c", "cpp", "objc", "objcpp", "cuda", "proto" },
|
||||||
|
root = {
|
||||||
|
".clangd",
|
||||||
|
".clang-tidy",
|
||||||
|
".clang-format",
|
||||||
|
"compile_commands.json",
|
||||||
|
"compile_flags.txt",
|
||||||
|
"configure.ac", -- AutoTools
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
|
||||||
-- Add C/C++ to treesitter
|
-- Add C/C++ to treesitter
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,4 +1,10 @@
|
||||||
return {
|
return {
|
||||||
|
recommended = function()
|
||||||
|
return LazyVim.extras.wants({
|
||||||
|
ft = "cmake",
|
||||||
|
root = { "CMakePresets.json", "CTestConfig.cmake", "cmake" },
|
||||||
|
})
|
||||||
|
end,
|
||||||
{
|
{
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
opts = function(_, opts)
|
opts = function(_, opts)
|
||||||
|
|
|
@ -1,4 +1,10 @@
|
||||||
return {
|
return {
|
||||||
|
recommended = function()
|
||||||
|
return LazyVim.extras.wants({
|
||||||
|
ft = "dockerfile",
|
||||||
|
root = { "Dockerfile", "docker-compose.yml", "compose.yml", "docker-compose.yaml", "compose.yaml" },
|
||||||
|
})
|
||||||
|
end,
|
||||||
{
|
{
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
opts = function(_, opts)
|
opts = function(_, opts)
|
||||||
|
|
|
@ -1,4 +1,10 @@
|
||||||
return {
|
return {
|
||||||
|
recommended = function()
|
||||||
|
return LazyVim.extras.wants({
|
||||||
|
ft = { "elixir", "eelixir", "heex", "surface" },
|
||||||
|
root = "mix.exs",
|
||||||
|
})
|
||||||
|
end,
|
||||||
{
|
{
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
opts = function(_, opts)
|
opts = function(_, opts)
|
||||||
|
|
|
@ -1,4 +1,10 @@
|
||||||
return {
|
return {
|
||||||
|
recommended = function()
|
||||||
|
return LazyVim.extras.wants({
|
||||||
|
ft = { "go", "gomod", "gowork", "gotmpl" },
|
||||||
|
root = { "go.work", "go.mod" },
|
||||||
|
})
|
||||||
|
end,
|
||||||
{
|
{
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
opts = function(_, opts)
|
opts = function(_, opts)
|
||||||
|
|
|
@ -16,6 +16,20 @@ local function extend_or_override(config, custom, ...)
|
||||||
end
|
end
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
recommended = function()
|
||||||
|
return LazyVim.extras.wants({
|
||||||
|
ft = "java",
|
||||||
|
root = {
|
||||||
|
"build.gradle",
|
||||||
|
"build.gradle.kts",
|
||||||
|
"build.xml", -- Ant
|
||||||
|
"pom.xml", -- Maven
|
||||||
|
"settings.gradle", -- Gradle
|
||||||
|
"settings.gradle.kts", -- Gradle
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
|
||||||
-- Add java to treesitter.
|
-- Add java to treesitter.
|
||||||
{
|
{
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
return {
|
return {
|
||||||
|
recommended = function()
|
||||||
|
return LazyVim.extras.wants({
|
||||||
|
ft = { "json", "jsonc", "json5" },
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
|
||||||
-- add json to treesitter
|
-- add json to treesitter
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,4 +1,10 @@
|
||||||
return {
|
return {
|
||||||
|
recommended = function()
|
||||||
|
return LazyVim.extras.wants({
|
||||||
|
ft = "markdown",
|
||||||
|
root = "README.md",
|
||||||
|
})
|
||||||
|
end,
|
||||||
{
|
{
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
opts = function(_, opts)
|
opts = function(_, opts)
|
||||||
|
|
|
@ -1,4 +1,11 @@
|
||||||
return {
|
return {
|
||||||
|
recommended = function()
|
||||||
|
return LazyVim.extras.wants({
|
||||||
|
ft = { "cs", "vb" },
|
||||||
|
root = { "*.sln", "*.csproj", "omnisharp.json", "function.json" },
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
|
||||||
{ "Hoffs/omnisharp-extended-lsp.nvim", lazy = true },
|
{ "Hoffs/omnisharp-extended-lsp.nvim", lazy = true },
|
||||||
{
|
{
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
|
|
@ -1,4 +1,10 @@
|
||||||
return {
|
return {
|
||||||
|
recommended = function()
|
||||||
|
return LazyVim.extras.wants({
|
||||||
|
ft = "ruby",
|
||||||
|
root = "Gemfile",
|
||||||
|
})
|
||||||
|
end,
|
||||||
{
|
{
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
opts = function(_, opts)
|
opts = function(_, opts)
|
||||||
|
|
|
@ -1,4 +1,10 @@
|
||||||
return {
|
return {
|
||||||
|
recommended = function()
|
||||||
|
return LazyVim.extras.wants({
|
||||||
|
ft = "rust",
|
||||||
|
root = { "Cargo.toml", "rust-project.json" },
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
|
||||||
-- Extend auto completion
|
-- Extend auto completion
|
||||||
{
|
{
|
||||||
|
|
|
@ -3,6 +3,12 @@
|
||||||
-- If you like you can setup your own key bindings.
|
-- If you like you can setup your own key bindings.
|
||||||
-- For minimalistic setup have a look at https://github.com/scalameta/nvim-metals/discussions/39
|
-- For minimalistic setup have a look at https://github.com/scalameta/nvim-metals/discussions/39
|
||||||
return {
|
return {
|
||||||
|
recommended = function()
|
||||||
|
return LazyVim.extras.wants({
|
||||||
|
ft = "scala",
|
||||||
|
root = { "build.sbt", "build.sc", "build.gradle", "pom.xml" },
|
||||||
|
})
|
||||||
|
end,
|
||||||
{
|
{
|
||||||
"hrsh7th/nvim-cmp",
|
"hrsh7th/nvim-cmp",
|
||||||
requires = {
|
requires = {
|
||||||
|
|
|
@ -1,4 +1,18 @@
|
||||||
return {
|
return {
|
||||||
|
recommended = function()
|
||||||
|
return LazyVim.extras.wants({
|
||||||
|
root = {
|
||||||
|
"tailwind.config.js",
|
||||||
|
"tailwind.config.cjs",
|
||||||
|
"tailwind.config.mjs",
|
||||||
|
"tailwind.config.ts",
|
||||||
|
"postcss.config.js",
|
||||||
|
"postcss.config.cjs",
|
||||||
|
"postcss.config.mjs",
|
||||||
|
"postcss.config.ts",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
{
|
{
|
||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
opts = {
|
opts = {
|
||||||
|
|
|
@ -1,4 +1,11 @@
|
||||||
return {
|
return {
|
||||||
|
recommended = function()
|
||||||
|
return LazyVim.extras.wants({
|
||||||
|
ft = { "terraform", "hcl" },
|
||||||
|
root = ".terraform",
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
|
||||||
{
|
{
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
opts = function(_, opts)
|
opts = function(_, opts)
|
||||||
|
|
|
@ -1,4 +1,10 @@
|
||||||
return {
|
return {
|
||||||
|
recommended = function()
|
||||||
|
return LazyVim.extras.wants({
|
||||||
|
ft = { "tex", "plaintex", "bib" },
|
||||||
|
root = { ".latexmkrc", ".texlabroot", "texlabroot", "Tectonic.toml" },
|
||||||
|
})
|
||||||
|
end,
|
||||||
{
|
{
|
||||||
"folke/which-key.nvim",
|
"folke/which-key.nvim",
|
||||||
optional = true,
|
optional = true,
|
||||||
|
|
|
@ -1,4 +1,11 @@
|
||||||
return {
|
return {
|
||||||
|
recommended = function()
|
||||||
|
return LazyVim.extras.wants({
|
||||||
|
ft = "vue",
|
||||||
|
root = { "vue.config.js" },
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
|
||||||
{
|
{
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
opts = function(_, opts)
|
opts = function(_, opts)
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
return {
|
return {
|
||||||
|
recommended = function()
|
||||||
|
return LazyVim.extras.wants({
|
||||||
|
ft = "yaml",
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
|
||||||
-- add yaml specific modules to treesitter
|
-- add yaml specific modules to treesitter
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue