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