Compare commits
5 commits
aa8ac561c5
...
7363de859a
| Author | SHA1 | Date | |
|---|---|---|---|
| 7363de859a | |||
| d327851de4 | |||
| ccfb260ab4 | |||
| ad595eced9 | |||
| 796131ba16 |
5 changed files with 12 additions and 16 deletions
13
lsp/nixd.lua
13
lsp/nixd.lua
|
|
@ -1,19 +1,8 @@
|
||||||
return {
|
return {
|
||||||
settings = {
|
settings = {
|
||||||
nixd = {
|
nixd = {
|
||||||
nixpkgs = {
|
|
||||||
expr = "import (builtins.getFlake(toString ./.)).inputs.nixpkgs { }",
|
|
||||||
},
|
|
||||||
formatting = {
|
formatting = {
|
||||||
command = {"alejandra"},
|
command = { "alejandra" },
|
||||||
},
|
|
||||||
options = {
|
|
||||||
nixos = {
|
|
||||||
expr = "let flake = builtins.getFlake(toString ./.); in flake.nixosConfigurations.skadi.options",
|
|
||||||
},
|
|
||||||
home_manager = {
|
|
||||||
expr = "let flake = builtins.getFlake(toString ./.); in flake.homeConfigurations.skadi.options",
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -31,3 +31,11 @@ vim.api.nvim_create_autocmd("BufWritePre", {
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- disable autocommenting lines
|
||||||
|
vim.api.nvim_create_autocmd("FileType", {
|
||||||
|
group = augroup,
|
||||||
|
pattern = "*",
|
||||||
|
callback = function()
|
||||||
|
vim.opt_local.formatoptions:remove({ "r", "o" })
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ vim.opt.laststatus = 3
|
||||||
|
|
||||||
-- setup tabs and indenting
|
-- setup tabs and indenting
|
||||||
vim.opt.expandtab = true
|
vim.opt.expandtab = true
|
||||||
vim.opt.smartindent = true
|
vim.opt.smartindent = false
|
||||||
vim.opt.autoindent = true
|
vim.opt.autoindent = true
|
||||||
vim.opt.tabstop = 2
|
vim.opt.tabstop = 2
|
||||||
vim.opt.shiftwidth = 2
|
vim.opt.shiftwidth = 2
|
||||||
|
|
@ -76,7 +76,6 @@ vim.opt.ttimeoutlen = 0
|
||||||
vim.opt.hidden = true
|
vim.opt.hidden = true
|
||||||
vim.opt.errorbells = false
|
vim.opt.errorbells = false
|
||||||
vim.opt.backspace = "indent,eol,start"
|
vim.opt.backspace = "indent,eol,start"
|
||||||
vim.opt.autochdir = false
|
|
||||||
vim.opt.iskeyword:append("-") -- treat dash as part of the word
|
vim.opt.iskeyword:append("-") -- treat dash as part of the word
|
||||||
vim.opt.path:append("**") -- include subdirectories in search
|
vim.opt.path:append("**") -- include subdirectories in search
|
||||||
vim.opt.modifiable = true
|
vim.opt.modifiable = true
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
vim.pack.add({
|
vim.pack.add({
|
||||||
{src = "https://github.com/stevearc/conform.nvim"},
|
{ src = "https://github.com/stevearc/conform.nvim" },
|
||||||
})
|
})
|
||||||
|
|
||||||
vim.api.nvim_create_user_command("Format", function(args)
|
vim.api.nvim_create_user_command("Format", function(args)
|
||||||
local range = nil
|
local range = nil
|
||||||
if args.count ~= -1 then
|
if args.count ~= -1 then
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@ vim.lsp.enable({
|
||||||
"ruff",
|
"ruff",
|
||||||
"basedpyright",
|
"basedpyright",
|
||||||
"yamlls",
|
"yamlls",
|
||||||
|
"bashls",
|
||||||
})
|
})
|
||||||
|
|
||||||
-- diagnostic settings
|
-- diagnostic settings
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue