Compare commits
No commits in common. "8075ec0091af825eb9e1c667e849312d27eca7d4" and "ad82b2f136532401f2c6f45359af2d8f742bc905" have entirely different histories.
8075ec0091
...
ad82b2f136
7 changed files with 103 additions and 164 deletions
|
|
@ -3,23 +3,18 @@
|
|||
let
|
||||
in
|
||||
{
|
||||
programs.delta = {
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "Haak Saxberg";
|
||||
userEmail = "haak.erling@gmail.com";
|
||||
delta = {
|
||||
enable = true;
|
||||
options = {
|
||||
side-by-side = true;
|
||||
line-numbers = true;
|
||||
};
|
||||
enableGitIntegration = true;
|
||||
};
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
settings = {
|
||||
user = {
|
||||
name = "Haak Saxberg";
|
||||
email = "haak.erling@gmail.com";
|
||||
};
|
||||
|
||||
extraConfig = {
|
||||
rebase = {
|
||||
updateRefs = true;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -28,33 +28,26 @@ with builtins;
|
|||
vimAlias = true;
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
vim-sensible
|
||||
{
|
||||
plugin = vim-precognition;
|
||||
config = ''
|
||||
lua << EOF
|
||||
require("precognition").setup({})
|
||||
EOF
|
||||
noremap ? :lua require("precognition").peek()<CR>
|
||||
'';
|
||||
}
|
||||
plenary-nvim
|
||||
{
|
||||
plugin = nvim-treesitter-legacy.withAllGrammars;
|
||||
config = ''
|
||||
lua << EOF
|
||||
require'nvim-treesitter.configs'.setup {
|
||||
highlight = {
|
||||
enable = true,
|
||||
},
|
||||
}
|
||||
EOF
|
||||
'';
|
||||
}
|
||||
|
||||
# cosmetic improvements
|
||||
vim-startify
|
||||
catppuccin-nvim
|
||||
vim-illuminate # highlight cursor-word
|
||||
nvim-web-devicons
|
||||
vim-precognition
|
||||
nvim-treesitter.withAllGrammars
|
||||
|
||||
{
|
||||
plugin = fzf-vim;
|
||||
config = ''
|
||||
noremap <leader>fc :BCommits<CR>
|
||||
'';
|
||||
}
|
||||
vim-elixir
|
||||
alchemist-vim
|
||||
vim-nix
|
||||
vim-javascript
|
||||
vim-json
|
||||
vim-jsx-pretty
|
||||
|
||||
vim-commentary
|
||||
vim-airline
|
||||
{
|
||||
plugin = rainbow;
|
||||
config = ''
|
||||
|
|
@ -73,57 +66,36 @@ with builtins;
|
|||
let g:indent_guides_start_level = 2
|
||||
'';
|
||||
}
|
||||
|
||||
# language-agnostic editor improvements
|
||||
{
|
||||
plugin = fzf-vim;
|
||||
config = ''
|
||||
noremap <leader>fc :BCommits<CR>
|
||||
'';
|
||||
}
|
||||
which-key-nvim
|
||||
{
|
||||
plugin = alpha-nvim;
|
||||
config = ''
|
||||
lua << EOF
|
||||
local alpha = require("alpha");
|
||||
local dashboard = require("alpha.themes.startify");
|
||||
alpha.setup(dashboard.config);
|
||||
EOF
|
||||
'';
|
||||
}
|
||||
{
|
||||
plugin = nvim-autopairs;
|
||||
config = ''
|
||||
lua << EOF
|
||||
require("nvim-autopairs").setup {}
|
||||
EOF
|
||||
'';
|
||||
}
|
||||
{
|
||||
plugin = lualine-nvim;
|
||||
config = ''
|
||||
lua << EOF
|
||||
require('lualine').setup()
|
||||
EOF
|
||||
'';
|
||||
}
|
||||
{
|
||||
plugin = comment-nvim;
|
||||
config = ''
|
||||
lua << EOF
|
||||
require('Comment').setup()
|
||||
EOF
|
||||
'';
|
||||
}
|
||||
vim-surround
|
||||
{
|
||||
# file explorer
|
||||
plugin = oil-nvim;
|
||||
plugin = vim-fugitive;
|
||||
config = ''
|
||||
nnoremap gb :Git blame<CR>
|
||||
'';
|
||||
}
|
||||
{
|
||||
plugin = git-blame-nvim;
|
||||
config = ''
|
||||
let g:gitblame_date_format = '%Y-%m-%d'
|
||||
nnoremap gC :GitBlameOpenCommitURL<CR>
|
||||
'';
|
||||
}
|
||||
{
|
||||
plugin = neogit;
|
||||
config = ''
|
||||
noremap <leader>g :Neogit<CR>
|
||||
lua << EOF
|
||||
local neogit = require('neogit')
|
||||
neogit.setup {}
|
||||
EOF
|
||||
'';
|
||||
}
|
||||
vinegar
|
||||
{
|
||||
plugin = gitsigns-nvim;
|
||||
config = ''
|
||||
lua << EOF
|
||||
require("oil").setup()
|
||||
vim.keymap.set("n", "-", "<CMD>Oil<CR>", { desc = "Open parent directory" })
|
||||
require('gitsigns').setup()
|
||||
EOF
|
||||
'';
|
||||
}
|
||||
|
|
@ -146,42 +118,6 @@ with builtins;
|
|||
endif
|
||||
'';
|
||||
}
|
||||
{
|
||||
plugin = telescope-nvim;
|
||||
config = ''
|
||||
nnoremap <leader>ff <cmd>lua require('telescope.builtin').find_files()<cr>
|
||||
nnoremap <leader>fg <cmd>lua require('telescope.builtin').live_grep()<cr>
|
||||
nnoremap <leader>fb <cmd>lua require('telescope.builtin').buffers()<cr>
|
||||
nnoremap <leader>fh <cmd>lua require('telescope.builtin').help_tags()<cr>
|
||||
'';
|
||||
}
|
||||
nvim-dap
|
||||
nvim-dap-ui
|
||||
|
||||
# Git stuff
|
||||
{
|
||||
plugin = vim-fugitive;
|
||||
config = ''
|
||||
nnoremap gb :Git blame<CR>
|
||||
'';
|
||||
}
|
||||
{
|
||||
plugin = git-blame-nvim;
|
||||
config = ''
|
||||
let g:gitblame_date_format = '%Y-%m-%d'
|
||||
nnoremap gC :GitBlameOpenCommitURL<CR>
|
||||
'';
|
||||
}
|
||||
{
|
||||
plugin = gitsigns-nvim;
|
||||
config = ''
|
||||
lua << EOF
|
||||
require('gitsigns').setup()
|
||||
EOF
|
||||
'';
|
||||
}
|
||||
|
||||
# Language servers
|
||||
cmp-nvim-lsp
|
||||
{
|
||||
plugin = nvim-lspconfig;
|
||||
|
|
@ -193,20 +129,22 @@ with builtins;
|
|||
# we'll probably always want them around.
|
||||
lua_ls = pkgs.lua-language-server;
|
||||
nixd = pkgs.nixd;
|
||||
|
||||
# Nearly always want the diagnostic server
|
||||
ts_server = pkgs.nodePackages.typescript-language-server;
|
||||
diagnostic_server = pkgs.nodePackages.diagnostic-languageserver;
|
||||
}
|
||||
) }
|
||||
EOF
|
||||
'';
|
||||
}
|
||||
|
||||
# language-specific plugins
|
||||
vim-nix
|
||||
vim-json
|
||||
dart-vim-plugin
|
||||
|
||||
{
|
||||
plugin = telescope-nvim;
|
||||
config = ''
|
||||
nnoremap <leader>ff <cmd>lua require('telescope.builtin').find_files()<cr>
|
||||
nnoremap <leader>fg <cmd>lua require('telescope.builtin').live_grep()<cr>
|
||||
nnoremap <leader>fb <cmd>lua require('telescope.builtin').buffers()<cr>
|
||||
nnoremap <leader>fh <cmd>lua require('telescope.builtin').help_tags()<cr>
|
||||
'';
|
||||
}
|
||||
# have the completion plugin get loaded last just in case anything above
|
||||
# needs to do setup work before completions get set up.
|
||||
{
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@ autocmd BufWritePre * :%s/\s\+$//e
|
|||
noremap ; :
|
||||
inoremap jj <Esc>
|
||||
noremap Q <nop>
|
||||
noremap ? :lua require("precognition").peek()<CR>
|
||||
|
||||
""" Esperanto digraphs (for use with ctrl-k)
|
||||
:digraph Cx 264
|
||||
|
|
@ -84,3 +85,11 @@ set scrolloff=10
|
|||
if filereadable($HOME . "/.vimrc.local")
|
||||
source ~/.vimrc.local
|
||||
endif
|
||||
|
||||
lua << EOF
|
||||
require'nvim-treesitter.configs'.setup {
|
||||
highlight = {
|
||||
enable = true,
|
||||
},
|
||||
}
|
||||
EOF
|
||||
|
|
|
|||
|
|
@ -1,6 +1,12 @@
|
|||
vim.lsp.config('*', {
|
||||
capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||
})
|
||||
local nvim_lsp = require("lspconfig")
|
||||
--
|
||||
-- https://vonheikemen.github.io/devlog/tools/setup-nvim-lspconfig-plus-nvim-cmp/
|
||||
local lsp_defaults = nvim_lsp.util.default_config
|
||||
lsp_defaults.capabilities = vim.tbl_deep_extend(
|
||||
'force',
|
||||
lsp_defaults.capabilities,
|
||||
require("cmp_nvim_lsp").default_capabilities()
|
||||
)
|
||||
|
||||
vim.api.nvim_create_autocmd("LspAttach", {
|
||||
desc = "LSP actions",
|
||||
|
|
@ -55,7 +61,7 @@ vim.api.nvim_create_autocmd("BufWritePre", {
|
|||
end
|
||||
})
|
||||
|
||||
vim.lsp.config("diagnosticls", {
|
||||
nvim_lsp.diagnosticls.setup {
|
||||
cmd = { "@diagnostic_server@/bin/diagnostic-languageserver", '--stdio' },
|
||||
filetypes = { 'javascript', 'javascriptreact', 'typescript', 'typescriptreact', 'css', 'scss', 'markdown', 'pandoc',
|
||||
'prisma' },
|
||||
|
|
@ -134,37 +140,34 @@ vim.lsp.config("diagnosticls", {
|
|||
prisma = 'prettier'
|
||||
}
|
||||
}
|
||||
});
|
||||
vim.lsp.enable("diagnosticls");
|
||||
}
|
||||
|
||||
vim.lsp.config("elmls", {})
|
||||
nvim_lsp.elmls.setup {
|
||||
}
|
||||
|
||||
local capabilitiesWithoutFomatting = vim.lsp.protocol.make_client_capabilities()
|
||||
capabilitiesWithoutFomatting.textDocument.formatting = false
|
||||
capabilitiesWithoutFomatting.textDocument.rangeFormatting = false
|
||||
capabilitiesWithoutFomatting.textDocument.range_formatting = false
|
||||
|
||||
vim.lsp.config("ts_ls", {
|
||||
cmd = { "typescript-language-server", '--stdio' },
|
||||
nvim_lsp.ts_ls.setup {
|
||||
cmd = { "@ts_server@/bin/typescript-language-server", '--stdio' },
|
||||
init_options = {
|
||||
hostInfo = "neovim",
|
||||
maxTsServerMemory = "8192",
|
||||
preferences = { quotePreference = "single", allowIncompleteCompletions = false },
|
||||
capabilities = capabilitiesWithoutFomatting
|
||||
}
|
||||
})
|
||||
vim.lsp.config("elixirls", {
|
||||
}
|
||||
nvim_lsp.elixirls.setup {
|
||||
cmd = { "elixir-ls" },
|
||||
})
|
||||
|
||||
vim.lsp.config("nixd", {
|
||||
}
|
||||
nvim_lsp.nixd.setup {
|
||||
cmd = { "@nixd@/bin/nixd" },
|
||||
});
|
||||
vim.lsp.enable("nixd");
|
||||
}
|
||||
nvim_lsp.rust_analyzer.setup {}
|
||||
|
||||
vim.lsp.config("rust_analyzer", {})
|
||||
|
||||
vim.lsp.config("lua_ls", {
|
||||
nvim_lsp.lua_ls.setup {
|
||||
cmd = { "@lua_ls@/bin/lua-language-server" },
|
||||
single_file_support = true,
|
||||
flags = {
|
||||
|
|
@ -177,10 +180,8 @@ vim.lsp.config("lua_ls", {
|
|||
}
|
||||
}
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
vim.lsp.config("texlab", {})
|
||||
nvim_lsp.texlab.setup {}
|
||||
|
||||
vim.lsp.config("gleam", {})
|
||||
|
||||
vim.lsp.config("dartls", {})
|
||||
nvim_lsp.gleam.setup {}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,7 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
# A command-line file manager
|
||||
programs.yazi = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
shellWrapperName = "y";
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{ pkgs, config, ... }:
|
||||
{ pkgs, ... }:
|
||||
|
||||
with builtins; {
|
||||
|
||||
|
|
@ -22,8 +22,6 @@ with builtins; {
|
|||
"vi-mode"
|
||||
];
|
||||
};
|
||||
|
||||
dotDir = "${config.xdg.configHome}/zsh";
|
||||
};
|
||||
|
||||
home.file.".oh-my-zsh/custom/themes/typewritten.zsh-theme" = {
|
||||
|
|
|
|||
|
|
@ -45,8 +45,8 @@ with builtins;
|
|||
(import ./programs/zsh)
|
||||
(import ./programs/tmux)
|
||||
(import ./programs/nvim)
|
||||
# (import ./programs/helix)
|
||||
# (import ./programs/yazi)
|
||||
(import ./programs/helix)
|
||||
(import ./programs/yazi)
|
||||
];
|
||||
|
||||
home.packages = defaultPkgs;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue