Compare commits
5 Commits
1970352b59
...
b67887a9d7
Author | SHA1 | Date | |
---|---|---|---|
b67887a9d7 | |||
f5619a9593 | |||
e129a4c8f6 | |||
b7518547c6 | |||
6a73ba3321 |
@ -8,7 +8,12 @@
|
|||||||
vim-fugitive
|
vim-fugitive
|
||||||
undotree
|
undotree
|
||||||
telescope-nvim
|
telescope-nvim
|
||||||
|
nvim-cmp
|
||||||
|
cmp-nvim-lsp
|
||||||
|
nvim-lspconfig
|
||||||
lsp-zero-nvim
|
lsp-zero-nvim
|
||||||
|
vim-floaterm
|
||||||
|
luasnip
|
||||||
(nvim-treesitter.withPlugins (p: [
|
(nvim-treesitter.withPlugins (p: [
|
||||||
p.tree-sitter-nix
|
p.tree-sitter-nix
|
||||||
p.tree-sitter-go
|
p.tree-sitter-go
|
||||||
@ -20,14 +25,22 @@
|
|||||||
];
|
];
|
||||||
extraLuaConfig = ''
|
extraLuaConfig = ''
|
||||||
${builtins.readFile ./options.lua}
|
${builtins.readFile ./options.lua}
|
||||||
|
${builtins.readFile ./plugins.lua}
|
||||||
|
${builtins.readFile ./keybinds.lua}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
# nix stuff
|
# nix stuff
|
||||||
nixpkgs-fmt
|
nixpkgs-fmt
|
||||||
nil
|
|
||||||
statix
|
statix
|
||||||
|
|
||||||
|
# LSPs
|
||||||
|
gopls
|
||||||
|
nodePackages.pyright
|
||||||
|
nodePackages.typescript-language-server
|
||||||
|
nil
|
||||||
|
yaml-language-server
|
||||||
];
|
];
|
||||||
home.sessionVariables.EDITOR = "nvim";
|
home.sessionVariables.EDITOR = "nvim";
|
||||||
}
|
}
|
||||||
|
18
home/editor/neovim/keybinds.lua
Normal file
18
home/editor/neovim/keybinds.lua
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
-- Keybinds
|
||||||
|
|
||||||
|
-- Term
|
||||||
|
vim.g.floaterm_keymap_toggle = '<leader>ft'
|
||||||
|
|
||||||
|
-- Tabs
|
||||||
|
vim.keymap.set('n', '<leader>n', ':tabnew<CR>',
|
||||||
|
{ silent = true, desc = '[N]ew tab' })
|
||||||
|
vim.keymap.set('n', '<leader>p', ':tabnext<CR>',
|
||||||
|
{ silent = true, desc = '[p]Next tab' })
|
||||||
|
vim.keymap.set('n', '<leader>P', ':tabprev<CR>',
|
||||||
|
{ silent = true, desc = '[P]Previous tab' })
|
||||||
|
|
||||||
|
-- Telescope
|
||||||
|
vim.keymap.set('n', '<leader>?', require('telescope.builtin').oldfiles,
|
||||||
|
{ desc = '[?] FInd recently opened files' })
|
||||||
|
vim.keymap.set('n', '<leader>ff', require('telescope.builtin').find_files,
|
||||||
|
{ desc = '[F]ind [F]iles' })
|
@ -1,3 +1,4 @@
|
|||||||
|
-- Options
|
||||||
vim.g.mapleader = ' '
|
vim.g.mapleader = ' '
|
||||||
vim.g.maplocalleader = ' '
|
vim.g.maplocalleader = ' '
|
||||||
|
|
||||||
|
51
home/editor/neovim/plugins.lua
Normal file
51
home/editor/neovim/plugins.lua
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
-- Plugins
|
||||||
|
|
||||||
|
-- LSP stuff
|
||||||
|
local lsp_zero = require('lsp-zero')
|
||||||
|
|
||||||
|
lsp_zero.on_attach(function(client, bufnr)
|
||||||
|
lsp_zero.default_keymaps({buffer = bufnr})
|
||||||
|
end)
|
||||||
|
|
||||||
|
require('lspconfig').gopls.setup({
|
||||||
|
settings = {
|
||||||
|
gopls = {
|
||||||
|
analyses = {
|
||||||
|
unusedparams = true,
|
||||||
|
},
|
||||||
|
staticcheck = true,
|
||||||
|
gofumpt = true,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Cmp
|
||||||
|
local cmp = require('cmp')
|
||||||
|
local cmp_action = lsp_zero.cmp_action()
|
||||||
|
|
||||||
|
cmp.setup({
|
||||||
|
mapping = cmp.mapping.preset.insert({
|
||||||
|
-- Enter to confirm completion
|
||||||
|
['<CR>'] = cmp.mapping.confirm({select = false}),
|
||||||
|
-- Ctrl+Space to open completion menu
|
||||||
|
['<C-Space>'] = cmp.mapping.complete(),
|
||||||
|
-- Move between snippet placeholders
|
||||||
|
['<C-f>'] = cmp_action.luasnip_jump_forward(),
|
||||||
|
['<C-b>'] = cmp_action.luasnip_jump_backward(),
|
||||||
|
-- Scroll in completion docs
|
||||||
|
['<C-k>'] = cmp.mapping.scroll_docs(-4),
|
||||||
|
['<C-j>'] = cmp.mapping.scroll_docs(4),
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Telescope
|
||||||
|
require('telescope').setup({
|
||||||
|
extensions = {
|
||||||
|
fzf = {
|
||||||
|
fuzzy = true,
|
||||||
|
override_generic_sorter = true,
|
||||||
|
override_file_sorter = true,
|
||||||
|
case_mode = "smart_case",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
})
|
@ -3,7 +3,7 @@
|
|||||||
# Generic tools
|
# Generic tools
|
||||||
age
|
age
|
||||||
btop
|
btop
|
||||||
bzip
|
bzip2
|
||||||
croc
|
croc
|
||||||
file
|
file
|
||||||
go-task
|
go-task
|
||||||
|
@ -31,9 +31,6 @@
|
|||||||
PATH = [ "${XDG_BIN_HOME}" ];
|
PATH = [ "${XDG_BIN_HOME}" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
# Enable sudo
|
|
||||||
security.sudo.enable = true;
|
|
||||||
|
|
||||||
# Enable flakes
|
# Enable flakes
|
||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
{ imports = [ ./podman.nix ./fonts.nix ./users.nix ./services.nix ]; }
|
{ imports = [ ./podman.nix ./fonts.nix ./users.nix ./services.nix ./security.nix ]; }
|
||||||
|
7
system/security.nix
Normal file
7
system/security.nix
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{ pkgs, ... }: {
|
||||||
|
# Enable sudo
|
||||||
|
security.sudo = {
|
||||||
|
enable = true;
|
||||||
|
wheelNeedsPassword = false;
|
||||||
|
};
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user