This commit is contained in:
foozzi 2024-01-03 13:34:39 -05:00
parent e50a63bb71
commit 0c50fe1718
6 changed files with 64 additions and 3 deletions

Binary file not shown.

View file

@ -5,6 +5,7 @@
"cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
"conform.nvim": { "branch": "master", "commit": "c4b2efb8aee4af0ef179a9b49ba401de3c4ef5d2" },
"friendly-snippets": { "branch": "main", "commit": "53d3df271d031c405255e99410628c26a8f0d2b0" },
"hardtime.nvim": { "branch": "main", "commit": "4ba3be553fa0b713c7b817f6d201b07d282accf3" },
"indent-blankline.nvim": { "branch": "master", "commit": "5da5546947f3125dfd6aa85ab21074dc83f776d5" },
@ -18,6 +19,7 @@
"nui.nvim": { "branch": "main", "commit": "80445d015d2b5f9af0d9e8bce63d303bc86eda8a" },
"nvim-autopairs": { "branch": "master", "commit": "9fd41181693dd4106b3e414a822bb6569924de81" },
"nvim-cmp": { "branch": "main", "commit": "538e37ba87284942c1d76ed38dd497e54e65b891" },
"nvim-lint": { "branch": "master", "commit": "4dbc7ec60b33b656f7c54bb945671a55b18699f2" },
"nvim-lspconfig": { "branch": "master", "commit": "9099871a7c7e1c16122e00d70208a2cd02078d80" },
"nvim-tree.lua": { "branch": "master", "commit": "50f30bcd8c62ac4a83d133d738f268279f2c2ce2" },
"nvim-treesitter": { "branch": "master", "commit": "7d0b4756aba3b220d38ec0443c6cc10944060dd7" },

View file

@ -0,0 +1,16 @@
return {
'stevearc/conform.nvim',
opts = {
formatters_by_ft = {
lua = { "stylua" },
python = { "ruff_format", "ruff_fix" },
javascript = { "biome" },
typescript = { "biome" },
json = { "biome" },
jsx = { "biome" },
sh = { "shfmt" },
['*'] = { 'trim_whitespace', 'codespell' },
},
},
lazy = false,
}

View file

@ -1,6 +1,8 @@
return {
"m4xshen/hardtime.nvim",
dependencies = { "MunifTanjim/nui.nvim", "nvim-lua/plenary.nvim" },
opts = {},
opts = {
max_time = 0,
},
lazy = false
}

View file

@ -36,10 +36,15 @@ local config = function()
vim.keymap.set("n", "<leader>vd", function() vim.diagnostic.open_float() end, opts)
vim.keymap.set("n", "[d", function() vim.diagnostic.goto_next() end, opts)
vim.keymap.set("n", "]d", function() vim.diagnostic.goto_prev() end, opts)
vim.keymap.set("n", "<leader>vca", function() vim.lsp.buf.code_action() end, opts)
vim.keymap.set("n", "<leader>ca", function() vim.lsp.buf.code_action() end, opts)
vim.keymap.set("n", "<leader>vrr", function() vim.lsp.buf.references() end, opts)
vim.keymap.set("n", "<leader>vrn", function() vim.lsp.buf.rename() end, opts)
vim.keymap.set("i", "<C-h>", function() vim.lsp.buf.signature_help() end, opts)
vim.keymap.set("n", "<leader>gi", function() vim.lsp.buf.implementation() end, opts)
-- nvim-lint
vim.keymap.set("n", "<leader>li", function() require("lint").try_lint() end, opts)
-- conform
vim.keymap.set("n", "<leader>ff", function() require("conform").format({ bufnr = bufnr }) end, opts)
end)
lsp_zero.set_sign_icons({
@ -53,11 +58,13 @@ local config = function()
require('mason-lspconfig').setup({
ensure_installed = {
"bashls",
"tsserver",
-- "tsserver",
"pyright",
"lua_ls",
"jsonls",
"clangd",
"ruff_lsp",
"biome"
},
automatic_installation = true,
handlers = {
@ -109,6 +116,21 @@ local config = function()
['<C-n>'] = cmp.mapping.select_next_item(cmp_select),
['<CR>'] = cmp.mapping.confirm({ select = true }),
['<C-Space>'] = cmp.mapping.complete(),
['<C-f>'] = cmp.mapping(function(fallback)
if luasnip.jumpable(1) then
luasnip.jump(1)
else
fallback()
end
end, {'i', 's'}),
['<C-b>'] = cmp.mapping(function(fallback)
if luasnip.jumpable(-1) then
luasnip.jump(-1)
else
fallback()
end
end, {'i', 's'}),
}),
})
end

View file

@ -0,0 +1,19 @@
local config = function()
require('lint').linters_by_ft = {
python = { "mypy" },
}
vim.api.nvim_create_autocmd({ "BufWritePost" }, {
callback = function()
require("lint").try_lint()
end,
})
end
return {
"mfussenegger/nvim-lint",
opts = {},
config = config,
lazy = false,
}