Compare commits

...

16 Commits

Author SHA1 Message Date
a4d57120bf Update nvim 2025-06-17 07:19:09 +02:00
7de0c50a3a Update things 2025-04-28 13:55:41 +02:00
05d3d997dc Merge branch 'nix' into nix-work 2025-02-27 12:09:55 +01:00
b606d2a33d Add open command 2025-02-27 09:03:02 +01:00
56da32336b Add nvim writing init 2025-02-26 19:55:40 +01:00
d6c9961745 Update nix; add some vim markdown 2025-02-26 19:52:41 +01:00
360362fb9e Fix git 2025-02-25 14:31:04 +01:00
c373f5fcfd Update git; Update vim 2025-02-25 14:29:55 +01:00
0e3e5077f3 Update versions 2024-12-04 07:22:37 +01:00
f9ebfc652f Fix git lg 2024-10-22 12:06:09 +02:00
8e8b47151f Add ripgrep-all 2024-09-22 10:05:00 +02:00
4a1c390fd6 Add neovim cmp signature tooltips 2024-06-12 12:08:40 +02:00
14b1f87938 Use system clipboard on all platforms 2024-05-21 19:37:49 +02:00
9dff153c8b Split task between work and home 2024-05-17 16:34:15 +02:00
2a2279ee29 Merge changes from work 2024-05-17 16:30:29 +02:00
386d856c60 Update flake 2024-05-17 16:03:50 +02:00
14 changed files with 598 additions and 21 deletions

View File

@ -13,7 +13,8 @@
nil
# neovim
(pkgs.nerdfonts.override { fonts = [ "FiraCode" ]; })
# (pkgs.nerdfonts.override { fonts = [ "FiraCode" ]; })
pkgs.nerd-fonts.fira-code
# (pkgs.writeShellScriptBin "my-hello" ''
# echo "Hello, ${config.home.username}!"
@ -48,7 +49,8 @@
# EDITOR = "nvim";
#};
# home.shellAliases = {
#home.shellAliases = {
# "ll" = "ls -la";
# "t" = "tmuxp";
# "tl" = "tmuxp load";
# };

33
nix/flake.lock generated
View File

@ -7,11 +7,11 @@
]
},
"locked": {
"lastModified": 1723986931,
"narHash": "sha256-Fy+KEvDQ+Hc8lJAV3t6leXhZJ2ncU5/esxkgt3b8DEY=",
"lastModified": 1745810134,
"narHash": "sha256-WfnYH/i7DFzn4SESQfWviXiNUZjohZhzODqLwKYHIPI=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "2598861031b78aadb4da7269df7ca9ddfc3e1671",
"rev": "be7cf1709b469a2a2c62169172a167d1fed3509f",
"type": "github"
},
"original": {
@ -20,13 +20,33 @@
"type": "github"
}
},
"nix-darwin": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1745816321,
"narHash": "sha256-Gyh/fkCDqVNGM0BWvk+4UAS17w2UI6iwnbQQCmc1TDI=",
"owner": "LnL7",
"repo": "nix-darwin",
"rev": "4515dacafb0ccd42e5395aacc49fd58a43027e01",
"type": "github"
},
"original": {
"owner": "LnL7",
"repo": "nix-darwin",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1724224976,
"narHash": "sha256-Z/ELQhrSd7bMzTO8r7NZgi9g5emh+aRKoCdaAv5fiO0=",
"lastModified": 1745526057,
"narHash": "sha256-ITSpPDwvLBZBnPRS2bUcHY3gZSwis/uTe255QgMtTLA=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "c374d94f1536013ca8e92341b540eba4c22f9c62",
"rev": "f771eb401a46846c1aebd20552521b233dd7e18b",
"type": "github"
},
"original": {
@ -39,6 +59,7 @@
"root": {
"inputs": {
"home-manager": "home-manager",
"nix-darwin": "nix-darwin",
"nixpkgs": "nixpkgs"
}
}

View File

@ -3,18 +3,54 @@
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nix-darwin.url = "github:LnL7/nix-darwin";
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { nixpkgs, home-manager, ... }:
outputs = { self, nix-darwin, nixpkgs, home-manager, ... }:
let
#system = "x86_64-darwin";
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
configuration = { pkgs, ... }: {
environment.systemPackages =
[
pkgs.vim
];
# Auto upgrade nix package and the daemon service.
services.nix-daemon.enable = true;
# nix.package = pkgs.nix;
nix.settings.experimental-features = "nix-command flakes";
programs.zsh.enable = true; # default shell on catalina
# Set Git commit hash for darwin-version.
system.configurationRevision = self.rev or self.dirtyRev or null;
# Used for backwards compatibility, please read the changelog before changing.
# $ darwin-rebuild changelog
system.stateVersion = 4;
# The platform the configuration will be used on.
nixpkgs.hostPlatform = system;
};
in {
# Build darwin flake using:
# $ darwin-rebuild build --flake .#Martins-MacBook-Pro
darwinConfigurations."Martins-MacBook-Pro" = nix-darwin.lib.darwinSystem {
modules = [ configuration ];
};
# Expose the package set, including overlays, for convenience.
darwinPackages = self.darwinConfigurations."Martins-MacBook-Pro".pkgs;
homeConfigurations = {
"moustachioed" = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
@ -22,9 +58,20 @@
modules = [
./user/profiles/moustachioedBook.nix
./common.nix
./user/task.nix
./user/task_home.nix
];
};
"martin" = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [
./user/profiles/martin.nix
./common.nix
./user/task_home.nix
];
};
"pan" = home-manager.lib.homeManagerConfiguration {
inherit pkgs;

View File

@ -8,4 +8,8 @@
};
programs.ripgrep.enable = true;
# home.packages = with pkgs; [
# harlequin
# ];
}

View File

@ -11,19 +11,49 @@
br = "branch";
pl = "pull";
ps = "push";
sw = "switch";
mno =" merge --no-ff";
lg = "log --color --graph --pretty=format:'%cred%h%creset -%c(yellow)%d%creset %s %cgreen(%cr)%c(bold blue)<%an>%creset' --abbrev-commit";
lg = "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%C(bold blue)<%an>%Creset' --abbrev-commit";
cleanup = "!git fetch --prune && git branch -vv | grep ': gone]' | awk '{print $1}' | xargs git branch -D";
};
difftastic.enable = true;
extraConfig = {
core = {
editor = "nvim";
column.ui = "auto";
branch.sort = "-committerdate";
tag.sort = "version:refname";
diff = {
algorithm = "histogram";
colorMoved = "plain";
mnemonicPrefix = "true";
renames = "true";
};
push.default = "matching";
pull.rebase = "true";
push = {
default = "simple";
autoSetupRemote = "true";
followTags = "true";
};
fetch = {
prune = "true";
pruneTags = "true";
all = "true";
};
help.autocorrect = "prompt";
commit.verbose = "true";
rerere = {
enabled = "true";
autoupdate = "true";
};
rebase = {
autoSquas = "true";
autoStash = "true";
updateRefs = "true";
};
merge.conflictstyle = "zdiff3";
core.editor = "nvim";
init.defaultBranch = "main";
merge.conflicstyle = "zdiff3";
};
ignores = [

View File

@ -8,12 +8,15 @@
vimAlias = true;
plugins = with pkgs.vimPlugins; [
aerial-nvim
zen-mode-nvim
vim-commentary
vim-repeat
vim-surround
nvim-tree-lua
targets-vim
delimitMate
vim-startify
# vim-startify
vim-windowswap
vim-nix
plenary-nvim
@ -29,12 +32,18 @@
cmp-path
cmp-cmdline
cmp-nvim-lsp
cmp-nvim-lsp-signature-help
cmp_yanky
cmp-git
nvim-lspconfig
lspkind-nvim
copilot-lua
copilot-cmp
image-nvim
img-clip-nvim
markdown-preview-nvim
vim-markdown
bullets-vim
(nvim-treesitter.withPlugins (p: [ p.awk p.bash p.c p.c_sharp p.cpp p.css p.diff p.dockerfile p.doxygen p.git_config p.gitcommit p.go p.gomod p.gosum p.gotmpl p.helm p.haskell p.html p.http p.java p.javascript p.json p.latex p.lua p.markdown p.markdown_inline p.matlab p.nix p.printf p.python p.regex p.rust p.sql p.strace p.supercollider p.svelte p.swift p.terraform p.tmux p.toml p.typescript p.vim p.xml p.yaml p.zig ]))
];
@ -51,6 +60,7 @@
home.packages = with pkgs; [
nodejs-slim
marksman
];
}

View File

@ -0,0 +1,13 @@
{ config, pkgs, ... }:
{
home.username = "martin";
home.homeDirectory = "/Users/martin";
home.stateVersion = "24.05"; # Please read the comment before changing.
programs.git = {
userName = "Martin";
userEmail = "git@pander-on.de";
};
}

View File

@ -60,7 +60,8 @@
programs.lsd = {
enable = true;
enableAliases = true;
# enableAliases = true;
enableZshIntegration = true;
};
programs.zoxide = {
@ -78,11 +79,17 @@
fd
du-dust
glow
#nerdfonts
ripgrep-all
(python3.withPackages (ps: [ ps.llm ps.llm-gemini]))
];
home.sessionVariables = lib.mkMerge [ {
BAT_THEME = "Coldark-Cold";
}
];
home.shellAliases = lib.mkMerge [ {
open = "explorer.exe .";
}
];
}

View File

@ -39,6 +39,13 @@
report.low.labels="ID,Active,Age,Deps,P,E,Project,Tag,Recur,S,Due,Until,Description,Urg";
report.low.sort="energy+,urgency-";
context.deferred.read = "+deferred";
context.deferred.write = "+deferred";
context.customer.read = "+cust";
context.customer.write = "+cust";
context.low_energy.read = "+low";
context.low_energy.write = "+low";
uda.taskwarrior-tui.task-report.show-info = false;
uda.taskwarrior-tui.selection.reverse = "yes";
};

37
nix/user/task_home.nix Normal file
View File

@ -0,0 +1,37 @@
{config, pkgs, lib, ...}:
{
programs.taskwarrior = {
enable = true;
colorTheme = "light-256";
package = pkgs.taskwarrior3;
config = {
weekstart = "monday";
uda.priority.values = "H,M,,L";
urgency.uda.priority.L.coefficient = -0.5;
urgency.user.tag.deferred.coefficient = -15.0;
urgency.user.tag.cust.coefficient = 5.0;
context.today.read = "-deferred and (prio:H or +next)";
context.today.write = "prio:H or +next";
context.deferred.read = "+deferred";
context.deferred.write = "+deferred";
context.low_energy.read = "+low";
context.low_energy.write = "+low";
uda.taskwarrior-tui.task-report.show-info = false;
uda.taskwarrior-tui.selection.reverse = "yes";
};
};
home.packages = with pkgs; [
taskwarrior-tui
];
home.shellAliases = lib.mkMerge [ {
t = "task";
tt = "taskwarrior-tui";
}
];
}

View File

@ -1,3 +1,6 @@
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
-------------------------
-------- OPTIONS --------
-------------------------
@ -46,6 +49,7 @@ vim.opt.autoread = true
vim.opt.syntax = 'on'
vim.opt.encoding = 'utf-8'
vim.opt.completeopt = 'menu,menuone,noselect'
vim.opt.termguicolors = true
----------------------------
@ -84,6 +88,40 @@ vim.api.nvim_create_autocmd('BufEnter', {
command = 'silent! lcd %:p:h'
})
-- Open nvim-tree when starting Neovim in a specific directory or any of its subdirectories
vim.api.nvim_create_autocmd("VimEnter", {
callback = function()
local args = vim.fn.argv()
if #args > 0 then
local current_dir = vim.fn.fnamemodify(args[1], ":p:h")
local dir_name = vim.fn.fnamemodify(current_dir, ":t")
-- Check if in a "notes" directory or its subdirectory
local in_notes = dir_name == "notes"
if not in_notes then
-- Check if any parent directory is named "notes"
local path_parts = vim.split(current_dir, "/", {plain = true})
for i, part in ipairs(path_parts) do
if part == "notes" then
in_notes = true
break
end
end
end
-- If in a notes directory or subdirectory, open the tree
if in_notes then
require("nvim-tree.api").tree.open()
vim.defer_fn(function()
require("nvim-tree.api").tree.expand_all()
-- After expanding, return focus to the main window/buffer
vim.cmd("wincmd p")
end, 100) -- Small delay to ensure tree is fully loaded before expanding
end
end
end
})
---------------------------
-------- FUNCTIONS --------
@ -92,3 +130,4 @@ vim.api.nvim_create_autocmd('BufEnter', {
vim.api.nvim_create_user_command('TrimWhiteSpace', function()
vim.cmd('%s/\\s\\+$//e')
end, {})

View File

@ -15,7 +15,7 @@ vim.keymap.set('n', '<leader>s', ':call WindowSwap#EasyWindowSwap()<CR>', {})
-- Convenience
vim.keymap.set('n', '<leader>w', ':w<CR>', { silent = true })
vim.keymap.set('n', '<leader>F', ':e.<CR>', {})
vim.keymap.set('n', '<leader>F', ':NvimTreeToggle<CR>', { noremap = true, silent = true })
vim.keymap.set('n', 'Y', 'y$', {})
-- Telescope

View File

@ -27,7 +27,7 @@ cmp.setup({
['<C-f>'] = cmp.mapping.scroll_docs(4),
['<C-Space>'] = cmp.mapping.complete(),
['<C-e>'] = cmp.mapping.abort(),
['<CR>'] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
['<Tab>'] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
}),
sources = cmp.config.sources({
@ -97,7 +97,6 @@ lspconfig.dockerls.setup({ capabilities = capabilities })
lspconfig.docker_compose_language_service.setup({ capabilities = capabilities })
lspconfig.flow.setup({ capabilities = capabilities })
lspconfig.marksman.setup({ capabilities = capabilities })
lspconfig.als.setup({ capabilities = capabilities })
lspconfig.sqls.setup({ capabilities = capabilities })
lspconfig.yamlls.setup({ capabilities = capabilities })
lspconfig.nil_ls.setup({ capabilities = capabilities })
@ -188,3 +187,26 @@ require("copilot").setup({
panel = { enabled = false },
})
require("copilot_cmp").setup()
vim.g.bullets_enabled_file_types = {
'markdown',
'text',
'gitcommit',
'scratch'
}
require("nvim-tree").setup({
sort = {
sorter = "case_sensitive",
},
view = {
width = 30,
},
renderer = {
group_empty = true,
},
-- filters = {
-- dotfiles = true,
-- },
})

338
nvim/writing-init.lua Normal file
View File

@ -0,0 +1,338 @@
-------------------------
-------- OPTIONS --------
-------------------------
vim.opt.mouse = 'a'
vim.opt.history = 1000
-- vim.opt.ruler = true
-- vim.opt.ruler = true
-- vim.opt.number = true
vim.opt.showcmd = true
vim.opt.ttimeoutlen = 100
vim.opt.backspace = 'indent,eol,start'
vim.opt.tabstop = 2
vim.opt.expandtab = true
vim.opt.shiftwidth = 2
vim.opt.softtabstop = 2
vim.opt.autoindent = true
vim.opt.showmatch = true
vim.opt.incsearch = true
vim.opt.hlsearch = true
vim.opt.wrapscan = true
vim.opt.ignorecase = true
vim.opt.smartcase = true
vim.opt.hidden = true
vim.opt.splitright = true
vim.opt.splitbelow = true
vim.opt.swapfile = false
vim.opt.wildmode = 'longest,list'
vim.opt.wildignore = vim.opt.wildignore + 'main,*.o,*.d,*.aux,*.bbl,*.lof,*.loa,*.blg,*.fdb_latexmk,*.fls,*.tdo,*.pdf,*.pyc'
vim.opt.spell = false
vim.opt.foldmethod = 'syntax'
vim.opt.foldopen = vim.opt.foldopen - 'block'
vim.opt.foldlevel = 99
vim.opt.lazyredraw = true
vim.opt.listchars = 'eol:¬,tab:▸ ,trail:·'
vim.opt.fillchars = 'vert:|,fold: '
vim.opt.list = true
vim.opt.laststatus = 2
vim.opt.scrolloff = 8
vim.opt.background = 'light'
vim.opt.wrap = true
vim.opt.showbreak = '..'
vim.opt.errorbells = false
vim.opt.visualbell = false
vim.opt.title = true
vim.opt.autoread = true
vim.opt.syntax = 'on'
vim.opt.encoding = 'utf-8'
vim.opt.completeopt = 'menu,menuone,noselect'
----------------------------
-------- CLIPBOARD ---------
----------------------------
-- if vim.fn.has("wsl") == 1 then
vim.opt.clipboard:append('unnamedplus')
-- end
----------------------------
-------- COMMANDS ----------
----------------------------
vim.cmd('filetype plugin indent on')
-- vim.cmd('colorscheme lucius')
-- vim.cmd('LuciusWhite')
------------------------------
---------- AUTOGROUPS --------
------------------------------
vim.api.nvim_create_augroup('VimIntern', { clear = true })
vim.api.nvim_create_autocmd({'FocusGained', 'BufEnter', 'CursorMoved', 'CursorMovedI', 'CursorHold', 'CursorHoldI'}, {
group = 'VimIntern',
pattern = '*',
command = 'silent! checktime'
})
vim.api.nvim_create_autocmd('BufEnter', {
group = 'VimIntern',
pattern = '*',
command = 'silent! lcd %:p:h'
})
-----------------------------
---------- FUNCTIONS --------
-----------------------------
vim.api.nvim_create_user_command('TrimWhiteSpace', function()
vim.cmd('%s/\\s\\+$//e')
end, {})
vim.g.mapleader = " "
-- Navigation
vim.keymap.set('n', 'j', 'gj', {})
vim.keymap.set('n', 'k', 'gk', {})
vim.keymap.set('v', 'j', 'gj', {})
vim.keymap.set('v', 'k', 'gk', {})
vim.keymap.set('n', '<C-h>', '<C-w>h', {})
vim.keymap.set('n', '<C-j>', '<C-w>j', {})
vim.keymap.set('n', '<C-k>', '<C-w>k', {})
vim.keymap.set('n', '<C-l>', '<C-w>l', {})
vim.keymap.set('n', '<leader>s', ':call WindowSwap#EasyWindowSwap()<CR>', {})
-- Convenience
vim.keymap.set('n', '<leader>w', ':w<CR>', { silent = true })
vim.keymap.set('n', '<leader>F', ':e.<CR>', {})
vim.keymap.set('n', 'Y', 'y$', {})
-- Telescope
local telebuiltin = require('telescope.builtin')
vim.keymap.set('n', '<leader>ff', telebuiltin.find_files, { silent = true })
vim.keymap.set('n', '<leader>fg', telebuiltin.live_grep, { silent = true })
vim.keymap.set('n', '<leader>fs', telebuiltin.grep_string, { silent = true })
vim.keymap.set('n', '<leader>o', telebuiltin.buffers, { silent = true })
vim.keymap.set('n', '<leader>fh', telebuiltin.help_tags, { silent = true })
---- Yanky
--vim.keymap.set({"n","x"}, "p", "<Plug>(YankyPutAfter)")
--vim.keymap.set({"n","x"}, "P", "<Plug>(YankyPutBefore)")
--vim.keymap.set({"n","x"}, "gp", "<Plug>(YankyGPutAfter)")
--vim.keymap.set({"n","x"}, "gP", "<Plug>(YankyGPutBefore)")
--vim.keymap.set("n", "<c-n>", "<Plug>(YankyCycleForward)")
--vim.keymap.set("n", "<c-p>", "<Plug>(YankyCycleBackward)")
--vim.keymap.set({"n","x"}, "y", "<Plug>(YankyYank)")
-- Undotree
vim.keymap.set('n', '<leader>u', vim.cmd.UndotreeToggle)
---- nnoremap <silent> <leader>t :CtrlPBufTagAll<CR>
---- nnoremap <silent> <leader>T :TagbarToggle<CR>
vim.g.delimitMate_expand_space=1
vim.g.delimitMate_expand_cr = 1
vim.g.tagbar_left=1
vim.g.tagbar_autoclose=1
vim.g.tagbar_autofocus=1
--vim.g.windowswap_map_keys=0
local cmp = require('cmp')
local lspkind = require('lspkind')
--cmp.setup({
-- snippet = {
-- expand = function(args)
-- vim.fn["vsnip#anonymous"](args.body) -- For `vsnip` users.
-- end,
-- },
-- window = {
-- completion = cmp.config.window.bordered(),
-- documentation = cmp.config.window.bordered(),
-- },
-- mapping = cmp.mapping.preset.insert({
-- ['<C-b>'] = cmp.mapping.scroll_docs(-4),
-- ['<C-f>'] = cmp.mapping.scroll_docs(4),
-- ['<C-Space>'] = cmp.mapping.complete(),
-- ['<C-e>'] = cmp.mapping.abort(),
-- ['<CR>'] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
-- }),
-- sources = cmp.config.sources({
-- { name = 'nvim_lsp' },
-- { name = 'vsnip' },
-- { name = 'path' },
-- { name = 'cmp_yanky' },
-- { name = 'git' },
-- { name = 'copilot' },
-- -- }, {
-- { name = 'buffer', keyword_length = 2 },
-- }),
-- formatting = {
-- format = lspkind.cmp_format({
-- -- mode = "symbol_text",
-- mode = "symbol",
-- menu = ({
-- buffer = "[buf]",
-- nvim_lsp = "[lsp]",
-- vsnip = "[snip]",
-- nvim_lua = "[lua]",
-- latex_symbols = "[tex]",
-- path = "[path]",
-- cmp_yanky = "[yank]",
-- copilot = "[copilot]",
-- }),
-- symbol_map = { Copilot = "" }
-- }),
-- },
--})
---- -- Set configuration for specific filetype.
---- cmp.setup.filetype('gitcommit', {
---- sources = cmp.config.sources({
---- { name = 'git' }, -- You can specify the `git` source if [you were installed it](https://github.com/petertriho/cmp-git).
---- }, {
---- { name = 'buffer' },
---- })
---- })
--cmp.setup.cmdline({ '/', '?' }, {
-- mapping = cmp.mapping.preset.cmdline(),
-- sources = {
-- { name = 'buffer' }
-- }
--})
--cmp.setup.cmdline(':', {
-- mapping = cmp.mapping.preset.cmdline(),
-- sources = cmp.config.sources({
-- { name = 'path' }
-- }, {
-- { name = 'cmdline' }
-- }),
-- matching = { disallow_symbol_nonprefix_matching = false }
--})
--local capabilities = require('cmp_nvim_lsp').default_capabilities()
local lspconfig = require("lspconfig")
--lspconfig.gopls.setup({ capabilities = capabilities })
--lspconfig.svelte.setup({ capabilities = capabilities })
--lspconfig.pyright.setup({ capabilities = capabilities })
--lspconfig.omnisharp.setup({ capabilities = capabilities })
--lspconfig.clangd.setup({ capabilities = capabilities })
--lspconfig.dockerls.setup({ capabilities = capabilities })
--lspconfig.docker_compose_language_service.setup({ capabilities = capabilities })
--lspconfig.flow.setup({ capabilities = capabilities })
lspconfig.marksman.setup({ capabilities = capabilities })
--lspconfig.als.setup({ capabilities = capabilities })
--lspconfig.sqls.setup({ capabilities = capabilities })
--lspconfig.yamlls.setup({ capabilities = capabilities })
--lspconfig.nil_ls.setup({ capabilities = capabilities })
require("yanky").setup({
ring = {
history_length = 100,
storage = "shada",
sync_with_numbered_registers = true,
cancel_event = "update",
},
system_clipboard = {
sync_with_ring = true,
},
preserve_cursor_position = {
enabled = true,
},
})
require("telescope").load_extension("yank_history")
require'nvim-treesitter.configs'.setup {
-- ensure_installed = { "lua", "vim", "help" },
ensure_installed = {},
sync_install = false,
auto_install = false,
highlight = {
enable = true,
disable = function(lang, buf)
local max_filesize = 100 * 1024 -- 100 KB
local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf))
if ok and stats and stats.size > max_filesize then
return true
end
end,
additional_vim_regex_highlighting = false,
},
}
require('lualine').setup({
options = {
icons_enabled = true,
theme = 'Tomorrow',
component_separators = { left = '', right = ''},
section_separators = { left = '', right = ''},
disabled_filetypes = {
statusline = {},
winbar = {},
},
ignore_focus = {},
always_divide_middle = true,
globalstatus = false,
refresh = {
statusline = 1000,
tabline = 1000,
winbar = 1000,
}
},
sections = {
lualine_a = {'mode'},
lualine_b = {'branch', 'diff', 'diagnostics'},
lualine_c = {'filename'},
lualine_x = {'encoding', 'fileformat', 'filetype'},
lualine_y = {'progress'},
lualine_z = {'location'}
},
inactive_sections = {
lualine_a = {},
lualine_b = {},
lualine_c = {'filename'},
lualine_x = {'location'},
lualine_y = {},
lualine_z = {}
},
tabline = {},
winbar = {},
inactive_winbar = {},
extensions = {}
})
--require("copilot").setup({
-- suggestion = { enabled = false },
-- panel = { enabled = false },
--})
--require("copilot_cmp").setup()
require("aerial").setup({
-- optionally use on_attach to set keymaps when aerial has attached to a buffer
on_attach = function(bufnr)
-- Jump forwards/backwards with '{' and '}'
vim.keymap.set("n", "{", "<cmd>AerialPrev<CR>", { buffer = bufnr })
vim.keymap.set("n", "}", "<cmd>AerialNext<CR>", { buffer = bufnr })
end,
})
-- You probably also want to set a keymap to toggle aerial
vim.keymap.set("n", "<leader>a", "<cmd>AerialToggle!<CR>")