WIP: Switch to NixOS #5

Draft
FunctionalHacker wants to merge 1349 commits from nix into main
4 changed files with 18 additions and 12 deletions
Showing only changes of commit 9c2f5dee4c - Show all commits

View file

@ -4,7 +4,7 @@ local m = {}
-- Maps LSP specific keybinds. -- Maps LSP specific keybinds.
-- This makes them only available when LSP is running -- This makes them only available when LSP is running
function m.map_keys() local function map_keys()
local telescope_builtin = require("telescope.builtin") local telescope_builtin = require("telescope.builtin")
require("which-key").register({ require("which-key").register({
g = { g = {
@ -42,7 +42,7 @@ function m.map_keys()
end end
-- Maps keys and does other needed actions -- Maps keys and does other needed actions
-- when client attatches -- when client attaches
function m.on_attach(client, bufnr) function m.on_attach(client, bufnr)
-- Attach navic if document symbols are available -- Attach navic if document symbols are available
if client.server_capabilities.documentSymbolProvider then if client.server_capabilities.documentSymbolProvider then
@ -50,7 +50,7 @@ function m.on_attach(client, bufnr)
end end
-- Setup keybinds -- Setup keybinds
m.map_keys() map_keys()
end end
-- Combine built-in LSP and cmp cabaibilities -- Combine built-in LSP and cmp cabaibilities
@ -62,8 +62,7 @@ function m.get_capabilities()
require("cmp_nvim_lsp").default_capabilities() require("cmp_nvim_lsp").default_capabilities()
) )
-- Neovim hasn't added foldingRange to default capabilities, users must add it manually -- Neovim hasn't added foldingRange to default capabilities, users must add it manually for ufo
-- for ufo
--capabilities.textDocument.foldingRange = { --capabilities.textDocument.foldingRange = {
-- dynamicRegistration = false, -- dynamicRegistration = false,
-- lineFoldingOnly = true, -- lineFoldingOnly = true,

View file

@ -1,5 +0,0 @@
-- vim api documentation for lua lsp
return {
"ii14/emmylua-nvim",
ft = { "lua" },
}

View file

@ -5,8 +5,7 @@ return {
local gitsigns = require("gitsigns") local gitsigns = require("gitsigns")
gitsigns.setup() gitsigns.setup()
local wk = require("which-key") require("which-key").register({
wk.register({
["["] = { h = { gitsigns.prev_hunk, "Previous hunk" } }, ["["] = { h = { gitsigns.prev_hunk, "Previous hunk" } },
["]"] = { h = { gitsigns.next_hunk, "Next hunk" } }, ["]"] = { h = { gitsigns.next_hunk, "Next hunk" } },
}) })

View file

@ -18,4 +18,17 @@ return {
lsp_doc_border = true, lsp_doc_border = true,
}, },
}, },
config = function(_, opts)
local noice = require("noice")
noice.setup(opts)
require("which-key").register({
d = {
function()
vim.cmd("NoiceDismiss")
end,
"Dismiss notifications",
},
}, { prefix = "<leader>" })
end,
} }