moving nvim.lua for stobbsm to nvim.nix
This commit is contained in:
@@ -56,19 +56,6 @@ vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '␣' }
|
|||||||
vim.opt.inccommand = 'split'
|
vim.opt.inccommand = 'split'
|
||||||
-- Set foldmethod, change in .editorconfig of projects
|
-- Set foldmethod, change in .editorconfig of projects
|
||||||
vim.opt.foldmethod = 'marker'
|
vim.opt.foldmethod = 'marker'
|
||||||
-- General gui settings
|
|
||||||
vim.o.guifont = 'JetBrainsMono Nerd Font:12'
|
|
||||||
-- Neovide settings
|
|
||||||
if vim.g.neovide then
|
|
||||||
vim.env.PATH = '/usr/local/bin:' .. vim.env.PATH
|
|
||||||
vim.env.PATH = '/usr/local/go/bin:' .. vim.env.PATH
|
|
||||||
vim.env.PATH = '/opt/homebrew/bin:' .. vim.env.PATH
|
|
||||||
vim.env.PATH = vim.env.HOME .. '/.local/bin:' .. vim.env.PATH
|
|
||||||
vim.env.PATH = vim.env.HOME .. '/.cargo/bin:' .. vim.env.PATH
|
|
||||||
vim.env.PATH = vim.env.HOME .. '/.local/cargo/bin:' .. vim.env.PATH
|
|
||||||
vim.env.PATH = vim.env.HOME .. '/go/bin:' .. vim.env.PATH
|
|
||||||
vim.env.PATH = vim.env.HOME .. '/.local/npm/bin:' .. vim.env.PATH
|
|
||||||
end
|
|
||||||
vim.cmd.colorscheme 'sprouting-dark'
|
vim.cmd.colorscheme 'sprouting-dark'
|
||||||
-- }}}
|
-- }}}
|
||||||
-- {{{ Helper functions
|
-- {{{ Helper functions
|
||||||
@@ -263,7 +250,6 @@ vim.filetype.add({
|
|||||||
}) -- }}}
|
}) -- }}}
|
||||||
-- {{{ LSP Configuration
|
-- {{{ LSP Configuration
|
||||||
local lspproto = vim.lsp.protocol
|
local lspproto = vim.lsp.protocol
|
||||||
local lspconfig = vim.lsp.config
|
|
||||||
local lspenable = vim.lsp.enable
|
local lspenable = vim.lsp.enable
|
||||||
local capabilities = lspproto.make_client_capabilities()
|
local capabilities = lspproto.make_client_capabilities()
|
||||||
-- Formatter autocmd
|
-- Formatter autocmd
|
||||||
|
|||||||
170
config/nvim/stobbsm/nvim.nix
Normal file
170
config/nvim/stobbsm/nvim.nix
Normal file
@@ -0,0 +1,170 @@
|
|||||||
|
{ pkgs, ... }: {
|
||||||
|
programs.neovim = {
|
||||||
|
enable = true;
|
||||||
|
extraLuaConfig = [
|
||||||
|
"vim.g.mapleader = ' '"
|
||||||
|
"vim.g.maplocalleader = ' '"
|
||||||
|
"vim.g.have_nerd_font = true"
|
||||||
|
"vim.opt.clipboard = 'unnamedplus'"
|
||||||
|
"vim.opt.cursorline = true"
|
||||||
|
"vim.opt.expandtab = true"
|
||||||
|
"vim.opt.hlsearch = true"
|
||||||
|
"vim.opt.inccommand = 'split'"
|
||||||
|
"vim.opt.modeline = true"
|
||||||
|
"vim.opt.mouse = 'a'"
|
||||||
|
"vim.opt.number = true"
|
||||||
|
"vim.opt.preserveindent = true"
|
||||||
|
"vim.opt.relativenumber = true"
|
||||||
|
"vim.opt.ruler = true"
|
||||||
|
"vim.opt.scrolloff = 5"
|
||||||
|
"vim.opt.shiftwidth = 2"
|
||||||
|
"vim.opt.showmode = true"
|
||||||
|
"vim.opt.showtabline = 1"
|
||||||
|
"vim.opt.softtabstop = 2"
|
||||||
|
"vim.opt.tabstop = 2"
|
||||||
|
"vim.opt.termguicolors = true"
|
||||||
|
"vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '␣' }"
|
||||||
|
"vim.opt.inccommand = 'split'"
|
||||||
|
"vim.opt.foldmethod = 'marker'"
|
||||||
|
"vim.cmd.colorscheme 'sprouting-dark'"
|
||||||
|
];
|
||||||
|
plugins = with pkgs.vimPlugins; [
|
||||||
|
{ plugin = mini-align; }
|
||||||
|
{ plugin = mini-basics; }
|
||||||
|
{ plugin = mini-diff; }
|
||||||
|
{ plugin = mini-extra; }
|
||||||
|
{ plugin = mini-git; }
|
||||||
|
{ plugin = mini-icons; }
|
||||||
|
{ plugin = mini-move; }
|
||||||
|
{ plugin = mini-operators; }
|
||||||
|
{ plugin = mini-pairs; }
|
||||||
|
{ plugin = mini-snippets; }
|
||||||
|
{ plugin = mini-splitjoin; }
|
||||||
|
{
|
||||||
|
plugin = mini-statusline;
|
||||||
|
type = "lua";
|
||||||
|
config = /* lua */''
|
||||||
|
content = {
|
||||||
|
active = function()
|
||||||
|
local check_macro_recording = function()
|
||||||
|
if vim.fn.reg_recording() ~= \'\' then
|
||||||
|
return '@' .. vim.fn.reg_recording()
|
||||||
|
else
|
||||||
|
return \'\'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- configure statusline for active windows
|
||||||
|
local mode, mode_hl = MiniStatusline.section_mode { trunc_width = 120 }
|
||||||
|
local git = MiniStatusline.section_git { trunc_width = 40 }
|
||||||
|
local diff = MiniStatusline.section_diff { trunc_width = 75 }
|
||||||
|
local diagnostics = MiniStatusline.section_diagnostics { trunc_width = 75 }
|
||||||
|
local lsp = MiniStatusline.section_lsp { trunc_width = 75 }
|
||||||
|
local filename = MiniStatusline.section_filename { trunc_width = 140 }
|
||||||
|
local fileinfo = MiniStatusline.section_fileinfo { trunc_width = 120 }
|
||||||
|
local location = MiniStatusline.section_location { trunc_width = 75 }
|
||||||
|
local search = MiniStatusline.section_searchcount { trunc_width = 75 }
|
||||||
|
local macro = check_macro_recording()
|
||||||
|
|
||||||
|
return MiniStatusline.combine_groups {
|
||||||
|
{ hl = mode_hl, strings = { mode } },
|
||||||
|
{ hl = 'MiniStatuslineDevinfo', strings = { git, diff, diagnostics, lsp } },
|
||||||
|
'%<', -- Mark general truncate point
|
||||||
|
{ hl = 'MiniStatuslineFilename', strings = { filename } },
|
||||||
|
'%=', -- End left alignment
|
||||||
|
{ hl = 'MiniStatuslineFilename', strings = { macro } },
|
||||||
|
{ hl = 'MiniStatuslineFileinfo', strings = { fileinfo } },
|
||||||
|
{ hl = mode_hl, strings = { search, location } },
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
use_icons = true,
|
||||||
|
set_vim_settings = true,
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
{ plugin = nui-nvim; }
|
||||||
|
{ plugin = nvim-colorizer-lua; }
|
||||||
|
{
|
||||||
|
plugin = noice-nvim;
|
||||||
|
type = "lua";
|
||||||
|
config = /* lua */''
|
||||||
|
lsp = {
|
||||||
|
override = {
|
||||||
|
['vim.lsp.util.convert_input_to_markdown_lines'] = true,
|
||||||
|
['vim.lsp.util.stylize_markdown'] = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
popupmenu = {
|
||||||
|
enabled = true,
|
||||||
|
backend = 'nui',
|
||||||
|
},
|
||||||
|
notify = {
|
||||||
|
enabled = true,
|
||||||
|
view = 'notify',
|
||||||
|
},
|
||||||
|
routes = {
|
||||||
|
{
|
||||||
|
view = 'notify',
|
||||||
|
filter = { event = 'msg_showmode' },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
{
|
||||||
|
plugin = snacks-nvim;
|
||||||
|
type = "lua";
|
||||||
|
config = /* lua */''
|
||||||
|
animate = {},
|
||||||
|
dim = {},
|
||||||
|
image = {},
|
||||||
|
indent = {},
|
||||||
|
lazygit = {},
|
||||||
|
picker = {},
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
{ plugin = lazygit-nvim; }
|
||||||
|
{ plugin = nvim-lspconfig; }
|
||||||
|
{ plugin = nvim-treesitter; }
|
||||||
|
{ plugin = plenary-nvim; }
|
||||||
|
{ plugin = go-nvim; }
|
||||||
|
{ plugin = guihua-lua; }
|
||||||
|
{
|
||||||
|
plugin = conform-nvim;
|
||||||
|
type = "lua";
|
||||||
|
config = /* lua */''
|
||||||
|
formatters_by_ft = {
|
||||||
|
ansible = { 'ansible-lint' },
|
||||||
|
buf = { 'buf' },
|
||||||
|
cmake = { 'cmake_format' },
|
||||||
|
go = { 'goimports' },
|
||||||
|
markdown = { 'cbfmt', 'mdformat' },
|
||||||
|
sql = { 'sqlfluff' },
|
||||||
|
terraform = { 'terraform_fmt' },
|
||||||
|
templ = { 'go tool templ fmt' },
|
||||||
|
},
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
{ plugin = which-key-nvim; }
|
||||||
|
{ plugin = yazi-nvim; }
|
||||||
|
{ plugin = dashboard-nvim; }
|
||||||
|
];
|
||||||
|
defaultEditor = true;
|
||||||
|
viAlias = true;
|
||||||
|
vimAlias = true;
|
||||||
|
vimdiffAlias = true;
|
||||||
|
withNodeJs = true;
|
||||||
|
withPerl = true;
|
||||||
|
withPython3 = true;
|
||||||
|
extraPackages = with pkgs; [
|
||||||
|
delve
|
||||||
|
ginkgo
|
||||||
|
golangci-lint
|
||||||
|
gopls
|
||||||
|
gotests
|
||||||
|
gotestsum
|
||||||
|
gotools
|
||||||
|
govulncheck
|
||||||
|
tree-sitter
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -239,28 +239,6 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
neovim = {
|
|
||||||
enable = true;
|
|
||||||
initLua = builtins.readFile ../config/nvim/stobbsm/nvim.lua;
|
|
||||||
defaultEditor = true;
|
|
||||||
viAlias = true;
|
|
||||||
vimAlias = true;
|
|
||||||
vimdiffAlias = true;
|
|
||||||
withNodeJs = true;
|
|
||||||
withPerl = true;
|
|
||||||
withPython3 = true;
|
|
||||||
extraPackages = with pkgs; [
|
|
||||||
delve
|
|
||||||
ginkgo
|
|
||||||
golangci-lint
|
|
||||||
gopls
|
|
||||||
gotests
|
|
||||||
gotestsum
|
|
||||||
gotools
|
|
||||||
govulncheck
|
|
||||||
tree-sitter
|
|
||||||
];
|
|
||||||
};
|
|
||||||
# noctalia = {
|
# noctalia = {
|
||||||
# enable = true;
|
# enable = true;
|
||||||
# settings = "${config.xdg.configHome}/dotfiles/niri/.config/niri/full.kdl";
|
# settings = "${config.xdg.configHome}/dotfiles/niri/.config/niri/full.kdl";
|
||||||
|
|||||||
Reference in New Issue
Block a user