lsp formatting

This commit is contained in:
Ivan Dimitrov 2023-07-14 22:23:42 +03:00
parent 0bb868bed1
commit f3e6d6dafb
2 changed files with 7 additions and 7 deletions

View File

@ -27,6 +27,7 @@ local servers = { tsserver = {}, pylsp = {}, lua_ls = {}, rnix = {} }
local cmp_capabilities = require("cmp_nvim_lsp").default_capabilities()
local on_attach = function(_, bufnr)
nmap("<leader>ca", vim.lsp.buf.code_action)
nmap('<leader>l', function() vim.lsp.buf.format() end)
nmap("K", vim.lsp.buf.hover)
nmap("gr", require("telescope.builtin").lsp_references)
end

View File

@ -1,13 +1,12 @@
{
pkgs,
lib,
...
{ pkgs
, lib
, ...
}: {
home = {
username = "ivand";
homeDirectory = "/home/ivand";
stateVersion = "23.05";
sessionPath = ["$HOME/.local/bin/" "$HOME/.local/share/pnpm"];
sessionPath = [ "$HOME/.local/bin/" "$HOME/.local/share/pnpm" ];
pointerCursor = {
name = "Bibata-Modern-Amber";
package = pkgs.bibata-cursors;
@ -56,7 +55,7 @@
barbar-nvim
cmp-nvim-lsp
luasnip
nightfox-nvim
nightfox-nvim
nvim-cmp
nvim-cmp
nvim-lspconfig
@ -65,7 +64,7 @@
plenary-nvim
telescope-nvim
telescope-nvim
vim-vinegar
vim-vinegar
];
extraLuaConfig = lib.fileContents ./cfg/nvim/init.lua;
};