aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Weigl-Bosker <stefan@s00.xyz>2025-06-07 13:00:46 -0400
committerStefan Weigl-Bosker <stefan@s00.xyz>2025-06-07 13:00:46 -0400
commit9c4e85ac16a29c7a50a115000097abcb182e210c (patch)
tree2b6a621fca6bd74985cbb686b8a89eee44488f4a
parent73121af786dc8a446d54efa1b8519fa122a89d1b (diff)
downloadhome-9c4e85ac16a29c7a50a115000097abcb182e210c.tar.gz
-rw-r--r--modules/neovim/default.nix118
-rw-r--r--modules/neovim/nvim/after/ftplugin/lean.lua1
-rw-r--r--modules/neovim/nvim/colors/acme.vim230
-rw-r--r--modules/neovim/nvim/init.lua9
-rw-r--r--modules/neovim/nvim/lua/config/fzf.lua98
-rw-r--r--modules/neovim/nvim/lua/config/keybinds.lua9
-rw-r--r--modules/neovim/nvim/lua/config/noice.lua14
-rw-r--r--modules/neovim/nvim/lua/config/oil.lua22
-rw-r--r--modules/neovim/nvim/lua/config/settings.lua46
-rw-r--r--modules/neovim/nvim/lua/config/statusline.lua59
-rw-r--r--modules/neovim/nvim/lua/config/telescope.lua12
11 files changed, 89 insertions, 529 deletions
diff --git a/modules/neovim/default.nix b/modules/neovim/default.nix
index 80e2498..f6475c9 100644
--- a/modules/neovim/default.nix
+++ b/modules/neovim/default.nix
@@ -1,4 +1,4 @@
-{ config, lib, pkgs, ...}:
+{ config, lib, pkgs, startup ? [], ...}:
let
cfg = config.modules.neovim;
scheme = config.modules.scheme;
@@ -11,6 +11,20 @@ let
};
doCheck = false;
};
+ grammarMatcher = yes: builtins.filter (drv: let
+ # NOTE: matches if pkgs.neovimUtils.grammarToPlugin was called on it.
+ cond = (builtins.match "^vimplugin-treesitter-grammar-.*" "${lib.getName drv}") != null;
+ match = if yes then cond else ! cond;
+ in
+ if drv ? outPath then match else ! yes);
+
+ start = grammarMatcher false startup;
+ collected_grammars = grammarMatcher true startup;
+
+ ts_grammars_combined = pkgs.symlinkJoin {
+ name = "all-treesitter-grammars";
+ paths = map (e: e.outPath) collected_grammars;
+ };
in
{
options.modules.neovim = {
@@ -28,85 +42,69 @@ in
recursive = true;
};
- xdg.configFile."nvim/colors" = {
- source = ./nvim/colors;
- recursive = true;
- };
-
- # home.sessionVariables.MANPAGER = "nvim +Man!";
-
- programs.neovim = {
+ programs.neovim =
+ {
enable = true;
defaultEditor = true;
viAlias = false;
vimAlias = false;
vimdiffAlias = true;
+ # allGrammars = pkgs.symlinkJoin {
+ # name = "allgrammars";
+ # paths = builtins.attrValues pkgs.vimPlugins.nvim-treesitter.grammarPlugins;
+ # };
plugins = with pkgs.vimPlugins; [
- nvim-treesitter
# nvim-treesitter.withAllGrammars
- (nvim-treesitter.withPlugins (p: with p; [
- tree-sitter-nix
- tree-sitter-make
- tree-sitter-cmake
- tree-sitter-verilog
- tree-sitter-scheme
- tree-sitter-llvm
- tree-sitter-html
- tree-sitter-glsl
- tree-sitter-devicetree
- tree-sitter-cuda
- tree-sitter-c
- tree-sitter-cpp
- tree-sitter-lua
- tree-sitter-zig
- tree-sitter-rust
- tree-sitter-haskell
- tree-sitter-toml
- tree-sitter-markdown
- tree-sitter-markdown-inline
- tree-sitter-tablegen
- ]))
+ nvim-treesitter.withPlugins (p: pkgs.symlinkJoin {
+ name = "allgrammars";
+ paths = builtins.attrValues pkgs.vimPlugins.nvim-treesitter.grammarPlugins;
+ })
+ # p.tree-sitter-nix
+ # p.tree-sitter-verilog
+ # p.tree-sitter-llvm
+ # p.tree-sitter-cuda
+ # p.tree-sitter-cpp
+ # p.tree-sitter-c
+ # p.tree-sitter-lua
+ # p.tree-sitter-zig
+ # p.tree-sitter-haskell
+ # p.tree-sitter-markdown
+ # p.tree-sitter-tablegen
+ lz-n
{
plugin = lean-nvim;
- config =
- # lua
- ''
- require('lean').setup{ mappings = true }
- '';
+ optional = true;
type = "lua";
}
- plenary-nvim
- mini-icons
- oil-nvim
+
+ {
+ plugin = plenary-nvim;
+ optional = true;
+ }
tmux-nvim
- # noice-nvim
- nvim-lspconfig
- # blink-cmp
- # tinted-vim
base16-nvim
- telescope-nvim
- telescope-fzf-native-nvim
- # fzf-lua
-# https://github.com/ibhagwan/fzf-lua/commit/26095d98c2969730457bf5b483919280e2cfb8bb
- # (fromGitHub "HEAD" "ibhagwan/fzf-lua")
- # fzf-lua.overrideAttrs (finalAttrs: previousAttrs: {
- # previousAttrs.doCheck = false;
- # })
- vim-obsession
- (pkgs.neovimUtils.buildNeovimPlugin {
- luaAttr = pkgs.luaPackages.fzf-lua;
- doCheck = false;
- })
+ {
+ plugin = telescope-nvim;
+ optional = true;
+ type = "lua";
+ config =
+ # lua
+ ''
+ require("lz.n").load({
+ "telescope.nvim",
+ cmd = "Telescope",
+ })
+ '';
+ }
];
- # extraLuaPackages = ps: with ps; [
- # ];
extraLuaConfig =
+ # lua
''
${builtins.readFile ./nvim/init.lua}
- vim.cmd[[${scheme.extraVimConfig}]]
vim.cmd[[colorscheme ${scheme.name}]]
'';
+ extraPackages = [ pkgs.ripgrep pkgs.gcc ];
};
};
}
diff --git a/modules/neovim/nvim/after/ftplugin/lean.lua b/modules/neovim/nvim/after/ftplugin/lean.lua
new file mode 100644
index 0000000..6895db1
--- /dev/null
+++ b/modules/neovim/nvim/after/ftplugin/lean.lua
@@ -0,0 +1 @@
+require('lean').setup{ mappings = true }
diff --git a/modules/neovim/nvim/colors/acme.vim b/modules/neovim/nvim/colors/acme.vim
deleted file mode 100644
index 3992a73..0000000
--- a/modules/neovim/nvim/colors/acme.vim
+++ /dev/null
@@ -1,230 +0,0 @@
-hi clear
-syntax reset
-let g:colors_name = "vacme"
-
-" This scheme is based on Acme & Plan9.
-" In keeping with Acme, it doesn't do syntax highlighting.
-" Instead, colors are (almost) only used to define vim's interface.
-" Made by Oliver Taylor <olivertaylor.net>.
-"
-" It requires your terminal theme to be set to matching colors.
-"
-" The general philosophy for terminal colors
-" is that the 2 darkest shades are handled by your terminal
-" (which can typically do true colors)
-" and the lightest are handled in 256.
-
-" {{{ Define colors
-" *********************************************************
-
-" This is where the colors are defined
-" 1 is the lightest value, 3 or 4 are the darkest values
-
-" SHADES OF WHITE
- let s:W1 = '#FFFFEC'
- let s:W2 = '#EEEEA7'
- let s:W3 = '#999957'
- let s:W4 = '#424242'
- let s:WC1 = '15'
- let s:WC2 = '08'
- let s:WC3 = '07'
- let s:WC4 = '238'
-
-" SHADES OF RED
- let s:R1 = '#F8E7E7'
- let s:R2 = '#F2ACAA'
- let s:R3 = '#B85C57'
- let s:RC1 = '224'
- let s:RC2 = '09'
- let s:RC3 = '01'
-
-" SHADES OF GREEN
- let s:G1 = '#EFFEEC'
- let s:G2 = '#98CE8F'
- let s:G3 = '#57864E'
- let s:GC1 = '194'
- let s:GC2 = '10'
- let s:GC3 = '02'
-
-" SHADES OF YELLOW (which is really brown in this context)
- let s:Y1 = '#EAEBDB'
- let s:Y2 = '#B7B19C'
- let s:Y3 = '#8F7634'
- let s:YC1 = '187'
- let s:YC2 = '11'
- let s:YC3 = '03'
-
-" SHADES OF BLUE
- let s:B1 = '#E2F1F8'
- let s:B2 = '#A6DCF8'
- let s:B3 = '#2A8DC5'
- let s:BC1 = '195'
- let s:BC2 = '12'
- let s:BC3 = '04'
-
-" SHADES OF MAGENTA
- let s:M2 = '#D0D0F7'
- let s:M3 = '#8888C7'
- let s:MC2 = '13'
- let s:MC3 = '05'
-
-" SHADES OF CYAN
- let s:C1 = '#EEFEFF'
- let s:C2 = '#B0ECED'
- let s:C3 = '#6AA7A8'
- let s:CC1 = '195'
- let s:CC2 = '14'
- let s:CC3 = '06'
-
-" ACCENT COLORS
- " DEEP BLUE:
- let s:A1 = '#030093'
- let s:AC1 = '18'
-
-" }}}
-" {{{ Reset Highlight Groups
-" *********************************************************
-
-" These are the default syntax highlighting groups.
-" If you don't reset them here they will inherit default values
-" Even after 'hilight clear'
-
-hi! Comment term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE
-hi! Constant term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE
-hi! Special term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE
-hi! Identifier term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE
-hi! Statement term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE
-hi! PreProc term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE
-hi! Type term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE
-hi! Underlined term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE
-hi! Ignore term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE
-hi! Error term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE
-hi! Todo term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE
-hi! NonText term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE
-hi! Directory term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE
-hi! ErrorMsg term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE
-hi! IncSearch term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE
-hi! Search term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE
-hi! MoreMsg term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE
-hi! ModeMsg term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE
-hi! LineNr term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE
-hi! CursorLineNr term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE
-hi! Question term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE
-hi! StatusLine term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE
-hi! StatusLineNC term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE
-hi! VertSplit term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE
-hi! Title term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE
-hi! Visual term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE
-hi! VisualNOS term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE
-hi! WarningMsg term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE
-hi! WildMenu term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE
-hi! Folded term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE
-hi! FoldColumn term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE
-hi! DiffAdd term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE
-hi! DiffChange term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE
-hi! DiffDelete term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE
-hi! DiffText term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE
-hi! SignColumn term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE
-hi! Conceal term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE
-hi! SpellBad term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE
-hi! SpellCap term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE
-hi! SpellRare term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE
-hi! SpellLocal term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE
-hi! Pmenu term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE
-hi! PmenuSel term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE
-hi! PmenuSbar term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE
-hi! PmenuThumb term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE
-hi! TabLine term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE
-hi! TabLineSel term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE
-hi! TabLineFill term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE
-hi! CursorColumn term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE
-hi! CursorLine term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE
-hi! ColorColumn term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE
-hi! MatchParen term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE
-
-" }}}
-" {{{ Interface Colors
-" *********************************************************
-
-exe "hi! Normal" ." guifg=".s:W4 ." ctermfg=".s:WC4 ." guibg=".s:W1 ." ctermbg=".s:WC1
-exe "hi! Visual" ." guifg=".s:W4 ." ctermfg=".s:WC4 ." guibg=".s:W2 ." ctermbg=".s:WC2
-exe "hi! NonText" ." guifg=".s:W3 ." ctermfg=".s:WC3
-exe "hi! StatusLine" ." guifg=".s:W4 ." ctermfg=".s:WC4 ." guibg=".s:C1 ." ctermbg=".s:CC1 ." cterm=bold,underline" ." gui=bold,underline"
-exe "hi! StatusLineNC" ." guifg=".s:W4 ." ctermfg=".s:WC4 ." guibg=".s:C1 ." ctermbg=".s:CC1
-exe "hi! LineNr" ." guifg=".s:W3 ." ctermfg=".s:WC3 ." guibg=".s:Y1 ." ctermbg=".s:WC1
-exe "hi! CursorLineNr" ." guifg=".s:W1 ." ctermfg=".s:WC1 ." guibg=".s:M3 ." ctermbg=".s:MC3
-exe "hi! VertSplit" ." guifg=".s:W4 ." ctermfg=".s:WC4 ." guibg=".s:C1 ." ctermbg=".s:CC1
-exe "hi! Folded" ." guifg=".s:Y3 ." ctermfg=".s:YC3
-exe "hi! FoldColumn" ." guifg=".s:Y2 ." ctermfg=".s:YC2 ." guibg=".s:Y1 ." ctermbg=".s:YC1
-exe "hi! TabLineSel" ." guifg=".s:W1 ." ctermfg=".s:WC1 ." guibg=".s:M3 ." ctermbg=".s:MC3
-
-exe "hi! Search" ." guifg=".s:W4 ." ctermfg=".s:WC4 ." guibg=".s:W2 ." ctermbg=".s:WC2
-exe "hi! IncSearch" ." guifg=".s:W1 ." ctermfg=".s:WC1 ." guibg=".s:M3 ." ctermbg=".s:MC3
-
-exe "hi! WildMenu" ." guifg=".s:W1 ." ctermfg=".s:WC1 ." guibg=".s:M3 ." ctermbg=".s:MC3
-exe "hi! Pmenu" ." guifg=".s:G3 ." ctermfg=".s:GC3 ." guibg=".s:G1 ." ctermbg=".s:GC1
-exe "hi! PmenuSel" ." guifg=".s:W4 ." ctermfg=".s:WC4 ." guibg=".s:G2 ." ctermbg=".s:GC2
-exe "hi! PmenuSbar" ." guifg=".s:G1 ." ctermfg=".s:GC1 ." guibg=".s:G3 ." ctermbg=".s:GC3
-exe "hi! PmenuThumb" ." guifg=".s:G1 ." ctermfg=".s:GC1 ." guibg=".s:W4 ." ctermbg=".s:WC4
-
-exe "hi! CursorColumn" ." guibg=".s:G1 ." ctermbg=".s:GC1
-exe "hi! CursorLine" ." guibg=".s:G1 ." ctermbg=".s:GC1
-
-hi! link TabLine StatusLineNC
-hi! link TabLineFill StatusLineNC
-hi! link SignColumn LineNr
-
-" ColorColumn
-" Cursor
-" CursorIM
-
-" VisualNOS
-" Conceal
-" EndOfBuffer
-
-" DiffAdd
-" DiffChange
-" DiffDelete
-" DiffText
-
-exe "hi! ErrorMsg" ." cterm=bold"
-exe "hi! ModeMsg" ." cterm=bold"
-exe "hi! MoreMsg" ." cterm=bold"
-exe "hi! WarningMsg" ." cterm=bold"
-exe "hi! Directory" ." cterm=bold"
-
-" }}}
-" {{{ Syntax highlighting
-" *********************************************************
-
-" I know I said this colorscheme doesn't do syntax highlighting, I lied.
-
-exe "hi! Comment" ." cterm=bold"
-exe "hi! Underlined" ." cterm=underline" ." gui=underline"
-exe "hi! Title" ." cterm=bold"
-
-exe "hi! SpellBad" ." guifg=".s:R3 ." ctermfg=".s:RC3 ." cterm=underline" ." gui=underline"
-exe "hi! SpellCap" ." cterm=underline" ." gui=underline"
-exe "hi! SpellLocal" ." cterm=underline" ." gui=underline"
-exe "hi! SpellRare" ." cterm=underline" ." gui=underline"
-
-exe "hi! htmlBold" ." cterm=bold"
-exe "hi! htmlItalic" ." cterm=italic" ." gui=italic"
-
-exe "hi! Ignore" ." cterm=bold"
-exe "hi! Error" ." guifg=".s:W1 ." ctermfg=".s:WC1 ." guibg=".s:R3 ." ctermbg=".s:RC3
-exe "hi! Todo" ." cterm=bold"
-
-exe "hi! Special" ." cterm=italic"
-exe "hi! MatchParen" ." cterm=bold"
-exe "hi! SpecialKey" ." cterm=bold"
-exe "hi! Ignore" ." cterm=bold"
-" exe "hi! String" ." cterm=italic"
-exe "hi! todo" ." cterm=bold"
-exe "hi! MatchParen" ." cterm=bold"
-
-exe "hi! helpHyperTextJump" ." cterm=bold"
-exe "hi! helpHyperTextEntry" ." cterm=bold"
-
-
-" }}}
diff --git a/modules/neovim/nvim/init.lua b/modules/neovim/nvim/init.lua
index 8a4de01..6d27ab6 100644
--- a/modules/neovim/nvim/init.lua
+++ b/modules/neovim/nvim/init.lua
@@ -2,9 +2,8 @@ require("config.settings")
require("config.keybinds")
require("config.colorscheme")
require("config.lsp")
-require("config.treesitter")
-require("config.icons")
-require("config.fzf")
-require("config.oil")
--- require("config.statusline")
+
+-- require("config.icons")
+-- require("config.treesitter")
require("config.tmux")
+
diff --git a/modules/neovim/nvim/lua/config/fzf.lua b/modules/neovim/nvim/lua/config/fzf.lua
deleted file mode 100644
index ce5d047..0000000
--- a/modules/neovim/nvim/lua/config/fzf.lua
+++ /dev/null
@@ -1,98 +0,0 @@
-require("fzf-lua").setup({
- defaults = {
- file_icons = false,
- prompt = false,
- -- hidden = true,
- },
- previewers = {
- builtin = {
- syntax = false,
- treesitter = false,
- -- toggle_behavior = "extend",
- },
- },
- keymap = {
- builtin = {
- ["<C-p>"] = "toggle-preview",
- },
- },
- files = {
- previewer = "builtin",
- cwd_prompt = false,
- prompt = " ",
- },
- grep = {
- actions = {
- ['<ctrl-g>'] = nil,
- },
- no_header = true,
- no_header_i = true,
- },
- winopts = {
- -- fullscreen = true,
- row = 1,
- col = 0,
- width = 1,
- height = 0.4,
- title_pos = "left",
- backdrop = 70,
- -- border = "rounded",
- -- border = "none",
- treesitter = {
- enabled = false,
- fzf_colors = false,
- },
- border = { "", "─", "", "", "", "", "", "" },
- preview = {
- layout = "horizontal",
- title_pos = "right",
- -- title = false,
- -- hidden = true,
- scrollbar = false,
- -- border = "none",
- -- border = "rounded",
- winopts = {
- number = false,
- },
- border = function(_, m)
- if m.type == "fzf" then
- return "single"
- else
- assert(m.type == "nvim" and m.name == "prev" and type(m.layout) == "string")
- local b = { "┌", "─", "┐", "│", "┘", "─", "└", "│" }
- if m.layout == "down" then
- b[1] = "├" --top right
- b[3] = "┤" -- top left
- elseif m.layout == "up" then
- b[7] = "├" -- bottom left
- b[6] = "" -- remove bottom
- b[5] = "┤" -- bottom right
- elseif m.layout == "left" then
- b[3] = "┬" -- top right
- b[5] = "┴" -- bottom right
- b[6] = "" -- remove bottom
- else -- right
- b[1] = "┬" -- top left
- b[7] = "┴" -- bottom left
- b[6] = "" -- remove bottom
- end
- return b
- end
- end,
- },
- on_create = function()
- vim.keymap.set('t', '<C-e>', '<Up>', { silent = true, buffer = true })
- end,
- },
- fzf_opts = {
- -- ["--tmux"] = "",
- ["--style"] = "minimal",
- ["--ansi"] = true,
- ["--no-bold"] = "",
- ["--bind"] = "ctrl-n:down,ctrl-e:up",
- },
- hls = {
- border = "FloatBorder",
- },
-})
-
diff --git a/modules/neovim/nvim/lua/config/keybinds.lua b/modules/neovim/nvim/lua/config/keybinds.lua
index 4f8df1b..0de6b52 100644
--- a/modules/neovim/nvim/lua/config/keybinds.lua
+++ b/modules/neovim/nvim/lua/config/keybinds.lua
@@ -21,7 +21,7 @@ swapnv('i', 'l')
swapnv('M', 'H')
swapnv('N', 'J')
---swapnv('E', 'K')
+swapnv('E', 'K')
swapnv('I', 'L')
nmap('<leader>tn', ':tabnew<CR>', { desc = "Open a new tab" })
@@ -50,13 +50,12 @@ map({'n', 't', 'i'}, '<M-N>', function() require("tmux").resize_bottom() end, {
map({'n', 't', 'i'}, '<M-E>', function() require("tmux").resize_top() end, { desc = "Resize top side of split" })
map({'n', 't', 'i'}, '<M-I>', function() require("tmux").resize_right() end, { desc = "Resize right side of split" })
--- nmap('<leader>fo', '<cmd>Telescope find_files<CR>', { silent = true })
-nmap('<leader>fo', '<cmd>FzfLua files<CR>', { silent = true })
+nmap('<leader>fo', '<cmd>Telescope find_files<CR>', { silent = true })
+-- nmap('<leader>fo', '<cmd>FzfLua files<CR>', { silent = true })
-- nmap('<leader>fe', '<cmd>lua require("oil").open(nil, { preview = { split = "aboveleft" } })<CR>', { silent = true })
nmap('<leader>fe', '<cmd>lua require("oil").toggle_float()<CR>', { silent = true })
--- nmap('<leader>?', '<cmd>Telescope live_grep<CR>', { silent = true })
-nmap('<leader>?', '<cmd>FzfLua live_grep_native<CR>', { silent = true })
+nmap('<leader>?', '<cmd>Telescope live_grep<CR>', { silent = true })
nmap('<leader>to', '<cmd>te<CR>', { silent = true; desc = "Open a terminal buffer in the current window." })
diff --git a/modules/neovim/nvim/lua/config/noice.lua b/modules/neovim/nvim/lua/config/noice.lua
deleted file mode 100644
index 29f7a1d..0000000
--- a/modules/neovim/nvim/lua/config/noice.lua
+++ /dev/null
@@ -1,14 +0,0 @@
-require("noice").setup({
- lsp = {
- override = {
- ["vim.lsp.util.convert_input_to_markdown_lines"] = true,
- [ "vim.lsp.util.sylize_markdown" ] = true,
- },
-
- presets = {
- command_palette = true,
- log_message_to_split = true,
- lsp_doc_border = true,
- },
- },
-})
diff --git a/modules/neovim/nvim/lua/config/oil.lua b/modules/neovim/nvim/lua/config/oil.lua
deleted file mode 100644
index 592421b..0000000
--- a/modules/neovim/nvim/lua/config/oil.lua
+++ /dev/null
@@ -1,22 +0,0 @@
-require("oil").setup({
- default_file_explorer = true,
- columns = {
- -- "icon"
- },
- constrain_cursor = "editable",
- skip_confirm_for_simple_edits = true,
- win_options = {
- number = false,
- relativenumber = false,
- cursorline = true,
- },
- view_options = {
- show_hidden = true,
- },
- float = {
- max_width = .7,
- max_height = .5,
- win_options = {
- },
- },
-})
diff --git a/modules/neovim/nvim/lua/config/settings.lua b/modules/neovim/nvim/lua/config/settings.lua
index 2c24ee6..b8001cf 100644
--- a/modules/neovim/nvim/lua/config/settings.lua
+++ b/modules/neovim/nvim/lua/config/settings.lua
@@ -1,56 +1,30 @@
+vim.loader.enable({enable=true})
vim.g.mapleader = ' '
-
--- vim.o.number = true
--- vim.o.relativenumber = true
-vim.o.number = false
-vim.o.tabstop = 2
-vim.o.shiftwidth = 2
-vim.o.relativenumber = false
-
+vim.o.number = true
+vim.o.relativenumber = true
+vim.o.shiftwidth = 4
vim.o.splitright = true
vim.o.splitbelow = true
-vim.o.scrolloff = 15
-vim.o.sidescrolloff = 12
+vim.o.scrolloff = 999
+vim.o.sidescrolloff = 999
vim.o.wrap = false
-vim.o.lbr = true
-vim.o.shortmess = "tToOCFIsWcCi"
+vim.o.shortmess = "tToOFIsWcCi"
vim.o.termguicolors = true
vim.opt.fillchars = {eob = " "}
vim.o.smd = false
---vim.opt.laststatus = 3
-vim.opt.laststatus=1
-vim.opt.cmdheight=0
---%-0{minwid}.{maxwid}{item
--- vim.opt.statusline="%=%f%=%r %p%% « %l, %c %y"
-vim.opt.statusline="%f%=%p%% « %l, %c "
-vim.cmd[[packadd! termdebug]]
--- vim.opt.winbar="%!nvim_treesitter#statusline()"
--- vim.cmd[[
--- hi StatusLineNC guibg=none
--- hi StatusLine guibg=none
--- ]]
--- vim.cmd[[
--- hi LineNr guifg=bg
--- hi LineNrAbove guifg=bg
--- hi LineNrBelow guifg=bg
--- ]]
+vim.o.cmdheight=0
+vim.opt.statusline="%=%f%=%r %p%% « %l, %c %y"
vim.opt.pumheight = 6
vim.opt.expandtab = true
vim.o.mouse=""
--- vim.o.guicursor=""
vim.o.swapfile=false
vim.opt.foldmethod = "expr"
-vim.opt.foldexpr = "v:lua.vim.treesitter.foldexpr()"
---vim.opt.foldcolumn = "0"
vim.opt.foldlevel = 99
vim.opt.foldlevelstart = 99
vim.opt.foldenable=true
--- vim.cmd[[syntax off]]
--- vim.o.winborder = 'rounded' breaks telescope
-
vim.cmd[[set wildchar=<C-n>]]
-vim.g.loaded_matchparen = 1
+-- vim.g.loaded_matchparen = 1 # disable matchparen
vim.cmd[[cnoreabbrev ts lua vim.treesitter.start()]]
require('vim._extui').enable({})
diff --git a/modules/neovim/nvim/lua/config/statusline.lua b/modules/neovim/nvim/lua/config/statusline.lua
deleted file mode 100644
index 3f29aa2..0000000
--- a/modules/neovim/nvim/lua/config/statusline.lua
+++ /dev/null
@@ -1,59 +0,0 @@
-local modes = {
- ["n"] = "",
- ["no"] = "",
- ["nt"] = "",
- ["v"] = "VISUAL",
- ["V"] = "VISUAL-LINE",
- [""] = "VISUAL-BLOCK",
- ["s"] = "SELECT",
- ["S"] = "SELECT-LINE",
- [""] = "SELECT-BLOCK",
- ["i"] = "INSERT",
- ["ic"] = "INSERT",
- ["R"] = "REPLACE",
- ["Rv"] = "VISUAL-REPLACE",
- ["c"] = "COMMAND",
- ["cv"] = "VIM-EX",
- ["ce"] = "EX",
- ["r"] = "PROMPT",
- ["rm"] = "MOAR",
- ["r?"] = "CONFIRM",
- ["!"] = "SHELL",
- ["t"] = "TERMINAL",
-}
-
-local function mode()
- local m = vim.api.nvim_get_mode().mode
- local s = modes[m]
- return s == "" and "" or string.format("%s » ", s)
-end
-
-M = {}
-
-M.statusline = function()
- return table.concat {
- " ",
- mode(),
- "%f%=%p%% « %l, %c "
- }
-end
-
-M.termStatus = function()
- return table.concat {
- " ",
- mode(),
- "%{b:term_title}%=%p%% « %l, %c "
- }
-end
-
-M.setup = function(config)
- vim.api.nvim_exec([[
- set statusline=%!v:lua.M.statusline()
- augroup Statusline
- au!
- au TermOpen * setlocal statusline=%!v:lua.M.termStatus()
- augroup END
- ]], false)
-end
-
-M.setup()
diff --git a/modules/neovim/nvim/lua/config/telescope.lua b/modules/neovim/nvim/lua/config/telescope.lua
new file mode 100644
index 0000000..c769a00
--- /dev/null
+++ b/modules/neovim/nvim/lua/config/telescope.lua
@@ -0,0 +1,12 @@
+local lz = require("lz.n")
+local keymap = lz.keymap({
+ "telescope.nvim",
+ cmd = "Telescope",
+ after = function()
+ require("telescope").setup()
+ end,
+})
+
+keymap.set("n", "<leader>fo", function()
+ require("telescope.builtin").find_files(require('telescope.themes').get_dropdown({}))
+end)