Compare commits

...

3 commits

Author SHA1 Message Date
214725ef36
flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/ab82a9612aa45284d4adf69ee81871a389669a9e' (2024-07-07)
  → 'github:NixOS/nixpkgs/038fb464fcfa79b4f08131b07f2d8c9a6bcc4160' (2024-07-28)
• Updated input 'treefmt-nix':
    'github:numtide/treefmt-nix/e1d7bd5ec6fc389eb3a90e232c4150338bf6a508' (2024-07-07)
  → 'github:numtide/treefmt-nix/8db8970be1fb8be9c845af7ebec53b699fe7e009' (2024-07-23)
2024-07-28 23:50:46 +08:00
3d070af4c7
neoformat -> null-ls 2024-07-28 23:50:04 +08:00
d696237fc0
lspconfig: add pyright 2024-07-28 23:47:20 +08:00
5 changed files with 41 additions and 47 deletions

View file

@ -22,11 +22,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1720368505, "lastModified": 1722141560,
"narHash": "sha256-5r0pInVo5d6Enti0YwUSQK4TebITypB42bWy5su3MrQ=", "narHash": "sha256-Ul3rIdesWaiW56PS/Ak3UlJdkwBrD4UcagCmXZR9Z7Y=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "ab82a9612aa45284d4adf69ee81871a389669a9e", "rev": "038fb464fcfa79b4f08131b07f2d8c9a6bcc4160",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -66,11 +66,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1720374026, "lastModified": 1721769617,
"narHash": "sha256-ludjqxhR/5lXwJ1H6zHmZqp+4e8dFPHE9FIZ2eBh2G4=", "narHash": "sha256-6Pqa0bi5nV74IZcENKYRToRNM5obo1EQ+3ihtunJ014=",
"owner": "numtide", "owner": "numtide",
"repo": "treefmt-nix", "repo": "treefmt-nix",
"rev": "e1d7bd5ec6fc389eb3a90e232c4150338bf6a508", "rev": "8db8970be1fb8be9c845af7ebec53b699fe7e009",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -1,15 +0,0 @@
return {
"romgrk/barbar.nvim",
dependencies = {
"lewis6991/gitsigns.nvim", -- OPTIONAL: for git status
"nvim-tree/nvim-web-devicons", -- OPTIONAL: for file icons
},
init = function()
vim.g.barbar_auto_setup = false
end,
opts = {
auto_hide = 1,
},
enabled = false,
}

View file

@ -16,20 +16,12 @@ return {
capabilities = capabilities, capabilities = capabilities,
}) })
require("lspconfig").pyright.setup({
capabilities = capabilities,
})
require("lspconfig").nil_ls.setup({ require("lspconfig").nil_ls.setup({
capabilities = capabilities, capabilities = capabilities,
settings = {
["nil"] = {
formatting = {
command = { "alejandra" },
},
nix = {
flake = {
autoArchive = true,
},
},
},
},
}) })
end, end,
} }

View file

@ -1,14 +0,0 @@
return {
"sbdchd/neoformat",
init = function()
-- Basic formatting
vim.g.neoformat_basic_format_retab = 1
vim.g.neoformat_basic_format_trim = 1
-- Prefer Alejandra for Nix files
vim.g.neoformat_enabled_nix = { "alejandra" }
end,
keys = {
{ "<leader>lf", "<cmd>Neoformat<CR>", desc = "Format file" },
},
}

31
lua/plugins/null-ls.lua Normal file
View file

@ -0,0 +1,31 @@
return {
"nvimtools/none-ls.nvim",
dependencies = { "nvim-lua/plenary.nvim" },
opts = function()
local null_ls = require("null-ls")
null_ls.setup({
sources = {
null_ls.builtins.formatting.alejandra,
null_ls.builtins.formatting.stylua,
null_ls.builtins.formatting.black,
},
})
end,
keys = {
{
"<leader>lf",
function()
vim.lsp.buf.format()
end,
desc = "Format file",
},
{
"<leader>a",
function()
vim.lsp.buf.code_action()
end,
desc = "Code action",
},
},
}