Compare commits
3 commits
012748be4f
...
214725ef36
Author | SHA1 | Date | |
---|---|---|---|
214725ef36 | |||
3d070af4c7 | |||
d696237fc0 |
5 changed files with 41 additions and 47 deletions
12
flake.lock
12
flake.lock
|
@ -22,11 +22,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1720368505,
|
||||
"narHash": "sha256-5r0pInVo5d6Enti0YwUSQK4TebITypB42bWy5su3MrQ=",
|
||||
"lastModified": 1722141560,
|
||||
"narHash": "sha256-Ul3rIdesWaiW56PS/Ak3UlJdkwBrD4UcagCmXZR9Z7Y=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "ab82a9612aa45284d4adf69ee81871a389669a9e",
|
||||
"rev": "038fb464fcfa79b4f08131b07f2d8c9a6bcc4160",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -66,11 +66,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1720374026,
|
||||
"narHash": "sha256-ludjqxhR/5lXwJ1H6zHmZqp+4e8dFPHE9FIZ2eBh2G4=",
|
||||
"lastModified": 1721769617,
|
||||
"narHash": "sha256-6Pqa0bi5nV74IZcENKYRToRNM5obo1EQ+3ihtunJ014=",
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"rev": "e1d7bd5ec6fc389eb3a90e232c4150338bf6a508",
|
||||
"rev": "8db8970be1fb8be9c845af7ebec53b699fe7e009",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
@ -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,
|
||||
}
|
|
@ -16,20 +16,12 @@ return {
|
|||
capabilities = capabilities,
|
||||
})
|
||||
|
||||
require("lspconfig").pyright.setup({
|
||||
capabilities = capabilities,
|
||||
})
|
||||
|
||||
require("lspconfig").nil_ls.setup({
|
||||
capabilities = capabilities,
|
||||
settings = {
|
||||
["nil"] = {
|
||||
formatting = {
|
||||
command = { "alejandra" },
|
||||
},
|
||||
nix = {
|
||||
flake = {
|
||||
autoArchive = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
|
|
@ -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
31
lua/plugins/null-ls.lua
Normal 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",
|
||||
},
|
||||
},
|
||||
}
|
Loading…
Reference in a new issue