lil lil formatters change
This commit is contained in:
@@ -99,7 +99,7 @@ vim.opt.updatetime = 250
|
||||
|
||||
-- Sets how neovim will display certain whitespace characters in the editor.
|
||||
-- vim.opt.list = true
|
||||
-- vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '␣' }
|
||||
-- vim.opt.listchars = { tab = "» ", trail = "·", nbsp = "␣" }
|
||||
|
||||
-- Preview substitutions live, as you type!
|
||||
vim.opt.inccommand = "split"
|
||||
@@ -352,7 +352,11 @@ require("lazy").setup({
|
||||
|
||||
-- Enable the following language servers
|
||||
local servers = {
|
||||
gopls = {},
|
||||
clangd = {},
|
||||
gopls = {
|
||||
filetypes = { "go", "gomod", "gowork", "gotmpl" },
|
||||
},
|
||||
|
||||
pyright = {},
|
||||
tsserver = {},
|
||||
|
||||
@@ -376,6 +380,13 @@ require("lazy").setup({
|
||||
|
||||
local ensure_installed = vim.tbl_keys(servers or {})
|
||||
vim.list_extend(ensure_installed, {
|
||||
"clangd",
|
||||
"clang-format",
|
||||
"gofumpt",
|
||||
"goimports-reviser",
|
||||
"gopls",
|
||||
"mypy",
|
||||
"ruff",
|
||||
"stylua",
|
||||
})
|
||||
require("mason-tool-installer").setup({ ensure_installed = ensure_installed })
|
||||
@@ -397,21 +408,16 @@ require("lazy").setup({
|
||||
opts = {
|
||||
notify_on_error = false,
|
||||
format_on_save = function(bufnr)
|
||||
local disable_filetypes = { c = true, cpp = true }
|
||||
local disable_filetypes = {}
|
||||
return {
|
||||
timeout_ms = 500,
|
||||
lsp_fallback = not disable_filetypes[vim.bo[bufnr].filetype],
|
||||
}
|
||||
end,
|
||||
formatters_by_ft = {
|
||||
go = { "gopls", "goimports-reviser", "gofumpt" },
|
||||
c = { "clang-format" },
|
||||
go = { "gofumpt", "goimports_reviser" },
|
||||
lua = { "stylua" },
|
||||
json = { "biome" },
|
||||
python = { "isort", "black" },
|
||||
javascript = { { "biome", "prettierd", "prettier" } },
|
||||
javascriptreact = { { "biome", "prettierd", "prettier" } },
|
||||
typescript = { { "biome", "prettierd", "prettier" } },
|
||||
typescriptreact = { { "biome", "prettierd", "prettier" } },
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -560,7 +566,7 @@ require("lazy").setup({
|
||||
"nvim-treesitter/nvim-treesitter-textobjects",
|
||||
},
|
||||
opts = {
|
||||
ensure_installed = { "c", "go", "html", "lua", "markdown", "typescript", "tsx" },
|
||||
ensure_installed = { "c", "go", "html", "lua", "python" },
|
||||
auto_install = true,
|
||||
highlight = {
|
||||
enable = true,
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
{
|
||||
"Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" },
|
||||
"LuaSnip": { "branch": "master", "commit": "be7be2ca7f55bb881a7ffc16b2efa5af034ab06b" },
|
||||
"bufferline.nvim": { "branch": "main", "commit": "64e2c5def50dfd6b6f14d96a45fa3d815a4a1eef" },
|
||||
"catpuccin": { "branch": "main", "commit": "02bdd749931a5d739063562e57531c118e081882" },
|
||||
"catpuccin": { "branch": "main", "commit": "6af91673ceccbd6e073b66c439e7fce239f72d24" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" },
|
||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
|
||||
@@ -17,14 +16,14 @@
|
||||
"mason.nvim": { "branch": "main", "commit": "751b1fcbf3d3b783fcf8d48865264a9bcd8f9b10" },
|
||||
"mini.nvim": { "branch": "main", "commit": "8371930e8b624feabf994c3382143e83e009ed9f" },
|
||||
"neodev.nvim": { "branch": "main", "commit": "ce9a2e8eaba5649b553529c5498acb43a6c317cd" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "ce16de5665c766f39c271705b17fff06f7bcb84f" },
|
||||
"nvim-lint": { "branch": "master", "commit": "4055dc856d5ac8f6b85748006fd8fa6457e086e8" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "e25c4cdecd3d58c0deccce0f372426c8c480bcce" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "8f3c541407e691af6163e2447f3af1bd6e17f9a3" },
|
||||
"nvim-lint": { "branch": "master", "commit": "861a04313501563bb1b11f125ae9b7237a517b9b" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "2beb3e9cac3ed9335f8972eb6082f380a4f1f124" },
|
||||
"nvim-tmux-navigation": { "branch": "main", "commit": "4898c98702954439233fdaf764c39636681e2861" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "fbe76211f45413feadb155a89073bf65b5766b2e" },
|
||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "2aa454e4037424c678a8ff033951a5be39e54b9c" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "6e355632387a085f15a66ad68cf681c1d7374a04" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "8aad4396840be7fc42896e3011751b7609ca4119" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "da0efd7398713a3177da5ce8690f0e5c5415763d" },
|
||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "23b820146956b3b681c19e10d3a8bc0cbd9a1d4c" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "5b9067899ee6a2538891573500e8fd6ff008440f" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "08e301982b9a057110ede7a735dd1b5285eb341f" },
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "9ef21b2e6bb6ebeaf349a0781745549bbb870d27" },
|
||||
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
|
||||
"telescope.nvim": { "branch": "0.1.x", "commit": "6312868392331c9c0f22725041f1ec2bef57c751" },
|
||||
|
||||
@@ -7,10 +7,7 @@ return {
|
||||
local lint = require("lint")
|
||||
|
||||
lint.linters_by_ft = {
|
||||
dockerfile = { "hadolint" },
|
||||
json = { "jsonlint" },
|
||||
markdown = { "markdownlint" },
|
||||
python = { "flake8" },
|
||||
python = { "ruff", "mypy" },
|
||||
}
|
||||
|
||||
-- To allow other plugins to add linters to require('lint').linters_by_ft,
|
||||
|
||||
Reference in New Issue
Block a user