mirror of
https://github.com/kogakure/dotfiles.git
synced 2026-02-03 20:25:30 +00:00
I tried Nix, but it had too many downsides so I removed it. 1. Didn't like that all files are immutable and simple config changes need a complete rebuild. 2. Setting up a new Mac didn't work as smoothly as promised. Not worth the effort. 3. It sucked a lot to always have to type in the password twice on each darwin-rebuild 4. It solves problems I never had.
53 lines
1.4 KiB
Lua
53 lines
1.4 KiB
Lua
-- Quickstart configs for Nvim LSP
|
|
-- https://github.com/neovim/nvim-lspconfig
|
|
return {
|
|
"neovim/nvim-lspconfig",
|
|
init = function()
|
|
require("lazyvim.util").lsp.on_attach(function(_, buffer)
|
|
-- stylua: ignore
|
|
vim.keymap.set("n", "g0", "<cmd>Telescope lsp_document_symbols<cr>", { buffer = buffer, desc = "Document Symbols" })
|
|
vim.keymap.set("n", "cc", "<cmd>lua vim.lsp.buf.code_action()<cr>", { buffer = buffer, desc = "Code Action" })
|
|
end)
|
|
end,
|
|
opts = {
|
|
inlay_hints = { enabled = false },
|
|
servers = {
|
|
astro = {},
|
|
cssls = {},
|
|
cssmodules_ls = {},
|
|
diagnosticls = {},
|
|
emmet_ls = {},
|
|
graphql = {},
|
|
html = {},
|
|
jsonls = {},
|
|
lua_ls = {},
|
|
nixd = {},
|
|
svelte = {},
|
|
tsserver = {},
|
|
yamlls = {},
|
|
},
|
|
},
|
|
setup = function()
|
|
local nvim_lsp = require("lspconfig")
|
|
nvim_lsp.nixd.setup({
|
|
cmd = { "nixd" },
|
|
setttings = {
|
|
nixd = {
|
|
expr = "import <nixpkgs> { }",
|
|
},
|
|
formattting = {
|
|
command = { "nixpkgs-fmt" },
|
|
},
|
|
options = {
|
|
nixos = {
|
|
expr = '(builtins.getFlake ("git+file://" + toString ./.)).nixosConfigurations.k-on.options',
|
|
},
|
|
home_manager = {
|
|
expr = '(builtins.getFlake ("git+file://" + toString ./.)).homeConfigurations."ruixi@k-on".options',
|
|
},
|
|
},
|
|
},
|
|
})
|
|
end,
|
|
}
|