simrat39 / rust-tools.nvim

Tools for better development in rust using neovim's builtin lsp
MIT License
2.17k stars 159 forks source link

file not included in module tree #357

Closed swithun-liu closed 1 year ago

swithun-liu commented 1 year ago

I am a beginner and I just configured nvim using LazyVim. Below is my configuration for the rust-tool plugin. The current issue is that other files under the src directory are showing errors indicating they are not included in the module tree

// lua/plugins/lsp.lua

return {
  {
    "neovim/nvim-lspconfig",
    dependencies = {
      "simrat39/rust-tools.nvim",
    },
    opts = {
      servers = {
        rust_analyzer = {},
      },
      setup = {
        rust_analyzer = function(_, opts)
          require("rust-tools").setup({ server = opts })
          return true
        end,
      },
    },
  },
}
image

it work well in CLion

swithun-liu commented 1 year ago

I find the retrieval path

image
#![cfg(target_os = "android")]

if I remove this line, it will works, but the code is right

swithun-liu commented 1 year ago

I see, though CLion doesn't show warning or error, but in fact the analysis of the code still has something wrong, so it's not the err of rust-tools