feat(extras): added recommended detectors for all languages
This commit is contained in:
@ -1,4 +1,10 @@
|
||||
return {
|
||||
recommended = function()
|
||||
return LazyVim.extras.wants({
|
||||
ft = "yaml.ansible",
|
||||
root = { "ansible.cfg", ".ansible-lint" },
|
||||
})
|
||||
end,
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = function(_, opts)
|
||||
|
@ -1,4 +1,17 @@
|
||||
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
|
||||
{
|
||||
|
@ -1,4 +1,10 @@
|
||||
return {
|
||||
recommended = function()
|
||||
return LazyVim.extras.wants({
|
||||
ft = "cmake",
|
||||
root = { "CMakePresets.json", "CTestConfig.cmake", "cmake" },
|
||||
})
|
||||
end,
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = function(_, opts)
|
||||
|
@ -1,4 +1,10 @@
|
||||
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",
|
||||
opts = function(_, opts)
|
||||
|
@ -1,4 +1,10 @@
|
||||
return {
|
||||
recommended = function()
|
||||
return LazyVim.extras.wants({
|
||||
ft = { "elixir", "eelixir", "heex", "surface" },
|
||||
root = "mix.exs",
|
||||
})
|
||||
end,
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = function(_, opts)
|
||||
|
@ -1,4 +1,10 @@
|
||||
return {
|
||||
recommended = function()
|
||||
return LazyVim.extras.wants({
|
||||
ft = { "go", "gomod", "gowork", "gotmpl" },
|
||||
root = { "go.work", "go.mod" },
|
||||
})
|
||||
end,
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = function(_, opts)
|
||||
|
@ -16,6 +16,20 @@ local function extend_or_override(config, custom, ...)
|
||||
end
|
||||
|
||||
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.
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
|
@ -1,4 +1,9 @@
|
||||
return {
|
||||
recommended = function()
|
||||
return LazyVim.extras.wants({
|
||||
ft = { "json", "jsonc", "json5" },
|
||||
})
|
||||
end,
|
||||
|
||||
-- add json to treesitter
|
||||
{
|
||||
|
@ -1,4 +1,10 @@
|
||||
return {
|
||||
recommended = function()
|
||||
return LazyVim.extras.wants({
|
||||
ft = "markdown",
|
||||
root = "README.md",
|
||||
})
|
||||
end,
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = function(_, opts)
|
||||
|
@ -1,4 +1,11 @@
|
||||
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 },
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
|
@ -1,4 +1,10 @@
|
||||
return {
|
||||
recommended = function()
|
||||
return LazyVim.extras.wants({
|
||||
ft = "ruby",
|
||||
root = "Gemfile",
|
||||
})
|
||||
end,
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = function(_, opts)
|
||||
|
@ -1,4 +1,10 @@
|
||||
return {
|
||||
recommended = function()
|
||||
return LazyVim.extras.wants({
|
||||
ft = "rust",
|
||||
root = { "Cargo.toml", "rust-project.json" },
|
||||
})
|
||||
end,
|
||||
|
||||
-- Extend auto completion
|
||||
{
|
||||
|
@ -3,6 +3,12 @@
|
||||
-- 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
|
||||
return {
|
||||
recommended = function()
|
||||
return LazyVim.extras.wants({
|
||||
ft = "scala",
|
||||
root = { "build.sbt", "build.sc", "build.gradle", "pom.xml" },
|
||||
})
|
||||
end,
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
requires = {
|
||||
|
@ -1,4 +1,18 @@
|
||||
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",
|
||||
opts = {
|
||||
|
@ -1,4 +1,11 @@
|
||||
return {
|
||||
recommended = function()
|
||||
return LazyVim.extras.wants({
|
||||
ft = { "terraform", "hcl" },
|
||||
root = ".terraform",
|
||||
})
|
||||
end,
|
||||
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = function(_, opts)
|
||||
|
@ -1,4 +1,10 @@
|
||||
return {
|
||||
recommended = function()
|
||||
return LazyVim.extras.wants({
|
||||
ft = { "tex", "plaintex", "bib" },
|
||||
root = { ".latexmkrc", ".texlabroot", "texlabroot", "Tectonic.toml" },
|
||||
})
|
||||
end,
|
||||
{
|
||||
"folke/which-key.nvim",
|
||||
optional = true,
|
||||
|
@ -1,4 +1,11 @@
|
||||
return {
|
||||
recommended = function()
|
||||
return LazyVim.extras.wants({
|
||||
ft = "vue",
|
||||
root = { "vue.config.js" },
|
||||
})
|
||||
end,
|
||||
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = function(_, opts)
|
||||
|
@ -1,4 +1,9 @@
|
||||
return {
|
||||
recommended = function()
|
||||
return LazyVim.extras.wants({
|
||||
ft = "yaml",
|
||||
})
|
||||
end,
|
||||
|
||||
-- add yaml specific modules to treesitter
|
||||
{
|
||||
|
Reference in New Issue
Block a user