mirror of
https://github.com/nmasur/dotfiles
synced 2024-12-04 18:19:08 +00:00
Compare commits
3 Commits
0f1cbe2e06
...
8b1032ebda
Author | SHA1 | Date | |
---|---|---|---|
|
8b1032ebda | ||
|
e55ee05c5c | ||
|
0cdae3569e |
@ -33,8 +33,8 @@
|
||||
"['<C-d>']" = dsl.rawLua "require('cmp').mapping.scroll_docs(-4)";
|
||||
"['<C-f>']" = dsl.rawLua "require('cmp').mapping.scroll_docs(4)";
|
||||
"['<C-e>']" = dsl.rawLua "require('cmp').mapping.abort()";
|
||||
"['<CR>']" = dsl.rawLua "require('cmp').mapping.confirm({ behavior = require('cmp').ConfirmBehavior.Replace, select = true, })";
|
||||
"['<C-r>']" = dsl.rawLua "require('cmp').mapping.confirm({ behavior = require('cmp').ConfirmBehavior.Replace, select = true, })";
|
||||
"['<C-y>']" = dsl.rawLua "require('cmp').mapping.confirm({ behavior = require('cmp').ConfirmBehavior.Insert, select = true, }, { 'i', 'c' })";
|
||||
"['<C-r>']" = dsl.rawLua "require('cmp').mapping.confirm({ behavior = require('cmp').ConfirmBehavior.Replace, select = true, }, { 'i', 'c' })";
|
||||
"['<Esc>']" = dsl.rawLua ''
|
||||
function(_)
|
||||
cmp.mapping({
|
||||
@ -44,7 +44,7 @@
|
||||
vim.cmd("stopinsert") --- Abort and leave insert mode
|
||||
end
|
||||
'';
|
||||
"['<C-l>']" = dsl.rawLua ''
|
||||
"['<C-k>']" = dsl.rawLua ''
|
||||
cmp.mapping(function(_)
|
||||
if require("luasnip").expand_or_jumpable() then
|
||||
require("luasnip").expand_or_jump()
|
||||
|
@ -2,8 +2,11 @@
|
||||
vim.keymap.set("n", "<Leader>gr", ":!gh browse %<CR><CR>", { silent = true })
|
||||
|
||||
-- Pop a terminal to watch the current run
|
||||
local gitwatch =
|
||||
require("toggleterm.terminal").Terminal:new({ cmd = "fish --interactive --init-command 'gh run watch'" })
|
||||
local gitwatch = require("toggleterm.terminal").Terminal:new({
|
||||
cmd = "fish --interactive --init-command 'gh run watch'",
|
||||
hidden = true,
|
||||
direction = "float",
|
||||
})
|
||||
|
||||
-- Set a toggle for this terminal
|
||||
function GITWATCH_TOGGLE()
|
||||
@ -11,4 +14,4 @@ function GITWATCH_TOGGLE()
|
||||
end
|
||||
|
||||
-- Keymap to toggle the run
|
||||
vim.keymap.set("n", "<Leader>gw", GITWATCH_TOGGLE)
|
||||
vim.keymap.set("n", "<Leader>W", GITWATCH_TOGGLE)
|
||||
|
@ -1,34 +1,50 @@
|
||||
{
|
||||
description = "Python project flake";
|
||||
|
||||
inputs.flake-utils.url = "github:numtide/flake-utils";
|
||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs";
|
||||
inputs.poetry2nix.url = "github:nix-community/poetry2nix";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs";
|
||||
poetry2nix.url = "github:nix-community/poetry2nix";
|
||||
};
|
||||
outputs =
|
||||
{ nixpkgs, poetry2nix, ... }:
|
||||
let
|
||||
projectDir = ./.;
|
||||
supportedSystems = [
|
||||
"x86_64-linux"
|
||||
"x86_64-darwin"
|
||||
"aarch64-linux"
|
||||
"aarch64-darwin"
|
||||
];
|
||||
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
|
||||
in
|
||||
{
|
||||
self,
|
||||
nixpkgs,
|
||||
flake-utils,
|
||||
poetry2nix,
|
||||
}:
|
||||
flake-utils.lib.eachDefaultSystem (
|
||||
system:
|
||||
let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [ poetry2nix.overlay ];
|
||||
};
|
||||
projectDir = ./.;
|
||||
in
|
||||
{
|
||||
defaultPackage = pkgs.poetry2nix.mkPoetryApplication { inherit projectDir; };
|
||||
devShells.default = pkgs.mkShell {
|
||||
buildInputs = [
|
||||
(pkgs.poetry2nix.mkPoetryEnv { inherit projectDir; })
|
||||
pkgs.poetry
|
||||
];
|
||||
};
|
||||
}
|
||||
);
|
||||
packages = forAllSystems (
|
||||
system:
|
||||
let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [ poetry2nix.overlays.default ];
|
||||
};
|
||||
in
|
||||
{
|
||||
default = pkgs.poetry2nix.mkPoetryApplication { inherit projectDir; };
|
||||
}
|
||||
);
|
||||
devShells = forAllSystems (
|
||||
system:
|
||||
let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [ poetry2nix.overlays.default ];
|
||||
};
|
||||
in
|
||||
{
|
||||
default = pkgs.mkShell {
|
||||
buildInputs = [
|
||||
(pkgs.poetry2nix.mkPoetryEnv { inherit projectDir; })
|
||||
pkgs.poetry
|
||||
];
|
||||
};
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user