Comments (7)
Glad you enjoy it π
Don't forget there is none-ls which is a fork in case it doesn't work out. I should put this in the readme π€
from efmls-configs-nvim.
I see where the problem is now, seems like your efm
config is on your user config. Hence, the efmls-configs
configurations is being executed (for path checking) as soon as you open nvim.
I've browsed the project.nvim plugin and don't see that they have any hooks for you to run some custom logic after you've switched to a project dir (where you could run the efm lspconfig setup).
I think you should use DirChanged
autocmd to then run efm
setup config in it, instead of setting up efm
in your main config. That way, efmls-configs
will check for the paths when it's executed inside DirChanged
event.
What I mean is, listen to a DirChanged
event and then run require('lspconfig').efm.setup()
inside that event. Of course, you will need some extra logic to know which project should run efm.
This is similar to what I do with my project plugin (creativenull/projectlocal.vim) where I setup a file on my project directory which will be executed when I cd into the directory (whether from terminal or from inside nvim). But fundamentally different to how project.nvim does it π
from efmls-configs-nvim.
Hmm this is weird, it should work out of box with mason.nvim.
Are you in the project directory when you open nvim
? You have to be in the project directory for it to pick up eslint install to node_modules
.
Could you also check some things:
- Run
:!which eslint
command inside nvim, it should either print out the path of eslint binary if installed via mason - Make sure you're not running the eslint lsp server, this is different to eslint run by efm,
:LspInfo
should only showefm
and maybetsserver
but noteslint
- Scoped it down to just eslint in your
languages
local eslint = require('efmls-configs.linters.eslint')
local languages = {
javascript = { eslint },
typescript = { eslint },
}
And then run :lua =vim.lsp.get_active_clients({ name = 'efm' })
and verify the settings property has the setup you have.
from efmls-configs-nvim.
I thought ahmedkhalf/project.nvim
was cding into my project directory for me, because when I run :!pwd
it prints the correct work directory, but to be sure I opened nvim from the directory, and it just worked.
Thanks for your help and congratulations on the project, it was really great to find this when I heard about the null-ls archiving.
from efmls-configs-nvim.
Sorry for reopening the issue, but since I don't think I'm getting any help soon on ahmedkhalf/project.nvim
issues, I will ask for some help here.
ahmedkhalf/project.nvim
changes my cwd, since the result of :!pwd
is the same as the project I'm working in, what should be changed to efmls use my project installed ESLint and Prettier?
from efmls-configs-nvim.
Hmm I would check if :pwd
is in the project and not :!pwd
which is the current working directory of the terminal/shell.
But outside of that I can only recommend to cd into the project for it to pick up your eslint and prettier setup.
from efmls-configs-nvim.
Yeah, the result of :!pwd
and :pwd
is the same.
I would like it to work when I open the project with ahmedkhalf/project.nvim
, I don't like to first try to remember the path of the project, then cd into it and only then open Neovim every time I want to change projects, but thanks for the help anyway.
from efmls-configs-nvim.
Related Issues (20)
- Formatter does not reflect changes to the buffer HOT 2
- Any interest in merging support for sql-formatter? HOT 5
- Provide all the tools and their configuration for relevant filetypes as a provider
- Feature request: Use mason-installed, non pip/node executables when available HOT 10
- [ERROR][2023-10-10 13:12:33] .../vim/lsp/rpc.lua:675 "rpc" "/home/w/.local/share/nvim/mason/bin/efm-langserver" "stderr" "2023/10/10 13:12:33 nil --color Never -: sh:θ‘1: nilοΌζͺζΎε°ε½δ»€\n\n" HOT 4
- `:checkhealth` is broken HOT 6
- Adopt formatter/linter commands from dead `null-ls` HOT 3
- Prettier config out of date HOT 4
- More declarative approach to settings extra args? HOT 2
- sqlfluff linter config HOT 2
- how to config the swiftformat for efmls? I can't understand different formatter configuration in source code. HOT 5
- Prettier, Prettierd: tabWidth property in the config file's ignored HOT 3
- Unclear how to partially override `efmls-configs` HOT 2
- How to remove stdout ? (Trying to add my custom formatter) HOT 1
- how to set `codespell` for all filetype? HOT 5
- golangci_lint linter not working when used from efmls HOT 2
- ERROR "mcs": No global executable found, check |efmls-configs-issues| for help HOT 8
- Golangci_Lint Lacks Ability to Run Against Package (Possible Configuration Error?) HOT 6
- Sqlfluff linting does not seem to work HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from efmls-configs-nvim.