Closed partounian closed 6 months ago
Hi @partounian ,
thanks for reporting! Can you please check if this commit fixes this issue?
That fixes my lualine issues, but seems like some linters are still reporting ENOENT: no such file or directory
when saving?
Hmm, I never stumbled over this error. Is it still the case? Which filetype?
hadolint
for docker files & the lua file linter
I work witch Dockerfiles and, of course, Lua 😆
How do you know linters and not formatters are responsible?
When I open a dockerfile, I get this message on the bottom right.
which hadolint
doesn't show a result. Seems like mason-lspconfig
isn't properly installing packages for me, because I don't see it here. Screenshot of mason/bin
& ~/.nvim_config.lua
below.
Apologies if I'm being a bother. Since this seems specific to me, I'll close this.
-- see ./lua/core/config/defaults.lua for all
-- possible values and a short description
return {
options = {
-- grepprg = "rg --hidden --vimgrep --smart-case --", -- use rg instead of grep
pumblend = 0, -- Popup blend
-- foldenable = true,
-- foldnestmax = 1,
-- foldcolumn = "1", -- '0' is not bad
-- foldlevel = 99, -- Using ufo provider need a large value, feel free to decrease the value
-- foldlevelstart = -1,
-- relativenumber = false, -- set relative numbered lines
},
plugins = {
alpha = {
-- disable_dashboard_header = true,
},
conform = {
-- https://github.com/stevearc/conform.nvim
enable = true,
opts = {
format_on_save = function()
-- Disable with a global variable
if vim.g.disable_autoformat then
return
end
return { async = false, timeout_ms = 500, lsp_fallback = false }
end,
-- log_level = vim.log.levels.TRACE,
formatters_by_ft = {
go = { "goimports", "gofmt" },
javascript = { "prettier" },
json = { "prettier" },
lua = { "stylua" },
markdown = { "prettier" },
python = { "isort", "ruff_format" },
sh = { "shfmt" },
terraform = { "terraform_fmt" },
-- tex = { "latexindent" },
typst = { "typstfmt" },
yaml = { "yamlfmt" },
},
},
},
copilot = {
enable = true,
},
lazy = {
-- dev = {
-- path = "~/workspace/github.com/allaman/",
-- },
disabled_neovim_plugins = {
-- "gzip",
"netrwPlugin",
"tarPlugin",
"tohtml",
"tutor",
"zipPlugin",
},
},
nvim_lint = {
enable = true,
opts = {
events = { "BufWritePost", "BufReadPost", "InsertLeave" },
linters_by_ft = {
dockerfile = { "hadolint" },
javascript = { "eslint_d" },
go = { "golangcilint" },
lua = { "selene" },
ruby = { "solargraph" },
sh = { "shellcheck" },
typescript = { "eslint_d" },
yaml = { "yamllint" },
},
},
},
git = {
-- which tool to use for handling git merge conflicts
-- choose between "git-conflict" and "diffview" or "both"
merge_conflict_tool = "git-conflict",
},
gopher = {
-- https://github.com/olexsmir/gopher.nvim
enable = true,
},
harpoon = {
-- https://github.com/ThePrimeagen/harpoon
enable = true,
},
indent_blankline = {
enable = true,
-- copied from https://github.com/Allaman/dots/blob/46d42f7a8b75cb18a6961225c2f43370c24b9e22/dot_nvim_config.lua.tmpl#L71C1-L74C7
enable_scope = false,
},
lf = {
-- https://github.com/lmburns/lf.nvim
enable = false,
replace_ntrw = 0,
key_mappings = function()
vim.keymap.set("n", "<leader>lf", "<cmd>lua require('lf').start()<cr>", { desc = "LF" })
end,
},
ltex = {
additional_lang = "", -- manually set a language in ltex-ls
},
lualine = {
extensions = { "fugitive", "lazy", "neo-tree", "nvim-dap-ui", "quickfix", "symbols-outline", "toggleterm" },
},
overseer = {
-- https://github.com/stevearc/overseer.nvim
enable = true,
key_mappings = function()
vim.keymap.set("n", "<leader>r", "<cmd>OverseerRun<cr>", { desc = "Overseer Run" })
vim.keymap.set("n", "<leader>tr", "<cmd>OverseerToggle<cr>", { desc = "Overseer" })
end,
},
symbol_usage = {
opts = {
vt_position = "end_of_line",
},
},
telescope = {
fzf_native = {
enable = true,
},
show_untracked_files = true,
},
trouble = {
enable = true,
opts = {
auto_preview = false,
},
},
zenmode = {
enable = true,
},
},
theme = {
name = "catppuccin",
catppuccin = {
-- dark
-- variant = "catppuccin-macchiato",
-- darkest
variant = "catppuccin-mocha",
-- light
-- variant = "catppuccin-latte",
-- in between-ish
-- variant = "catppuccin-frappe",
},
},
-- treesitter parsers to be installed
-- one of "all", "maintained" (parsers with maintainers), or a list of languages
treesitter_ensure_installed = {
"bash",
"cmake",
"css",
"dockerfile",
"go",
"graphql",
"hcl",
"html",
"javascript",
"json",
"jsonc",
"lua",
"markdown",
"markdown_inline",
"query",
"python",
"regex",
"ruby",
"sql",
"toml",
"tsx",
"typescript",
"vim",
"yaml",
},
-- LSPs that should be installed by Mason-lspconfig
lsp_servers = {
"bashls",
-- "cssls",
"dockerls",
"jsonls",
"gopls",
"marksman",
"pyright",
"lua_ls",
"ruby_ls",
"solargraph",
"tailwindcss",
"tsserver",
"typst_lsp",
"yamlls",
},
-- Tools that should be installed by Mason
tools = {
-- Formatter
"isort",
"prettier",
"prettierd",
"stylua",
"shfmt",
-- Linter
"hadolint",
"eslint_d",
"shellcheck",
"selene",
"staticcheck",
"yamllint",
"ruff",
-- DAP
"debugpy",
"codelldb",
-- Go
"gofumpt",
"goimports",
"gomodifytags",
"golangci-lint",
"gotests",
"iferr",
"impl",
},
}
I guess I manually needed to run Mason
in vim
Hello @partounian ,
Apologies if I'm being a bother. Since this seems specific to me, I'll close this.
No worries :)
I guess I manually needed to run Mason in vim
IIRC, only LSPs are handled automatically. Tools are installed only when calling Mason. Honestly, I can't tell you by hard why this is the case and why I separated "lsps" and "tools" ... At some point, this logic needs a little refactoring 😆
Error running selene: ENOENT: no such file or directory
when saving a.lua
file.And the following on neovim startup