This commit is contained in:
Philipp Hochkamp 2023-03-06 21:27:28 +01:00
parent a0b8181590
commit ff9e47e96b
10 changed files with 57 additions and 74 deletions

4
flake.lock generated
View file

@ -360,7 +360,7 @@
"type": "github"
}
},
"notice-nvim": {
"noice-nvim": {
"flake": false,
"locked": {
"lastModified": 1677882849,
@ -493,7 +493,7 @@
"nixpkgs-darwin": "nixpkgs-darwin",
"nixpkgs-master": "nixpkgs-master",
"nnn-vim": "nnn-vim",
"notice-nvim": "notice-nvim",
"noice-nvim": "noice-nvim",
"notify-nvim": "notify-nvim",
"octoprint-spoolmanager": "octoprint-spoolmanager",
"octoprint-telegram": "octoprint-telegram",

View file

@ -34,8 +34,8 @@
nnn-vim.flake = false;
notify-nvim.url = "github:rcarriga/nvim-notify";
notify-nvim.flake = false;
notice-nvim.url = "github:folke/noice.nvim";
notice-nvim.flake = false;
noice-nvim.url = "github:folke/noice.nvim";
noice-nvim.flake = false;
## zsh
zsh-completions.url = "github:zsh-users/zsh-completions";

View file

@ -1,36 +1,7 @@
{
"suggest.triggerCompletionWait": 50,
"semanticTokens": {
"filetypes": ["nix"]
},
"coc.preferences.formatOnSaveFiletypes": ["nix"],
"suggest.enablePreview": true,
"html.enable": true,
"python.linting.enabled": true,
"html.format.enable": true,
"html.suggest.html5": true,
"html.validate.html": true,
"html.validate.styles": true,
"diagnostic-languageserver.mergeConfig": true,
"diagnostic-languageserver.filetypes": {
"vim": "vint",
"sh": "shellcheck",
"markdown": "write-good"
},
"diagnostic-languageserver.formatFiletypes": {
"sh": "shfmt"
},
"tabnine.disable_filetypes": ["pandoc"],
"flutter.provider.hot-reload": true,
"flutter.provider.enableSnippet": true,
"snippets.ultisnips.direcories": ["snippets"],
"rust-analyzer.procMacro.enable": true,
"rust-analyzer.cargo.allFeatures": true,
"rust-analyzer.inlayHints.refreshOnInsertMode": true,
"rust-analyzer.updates.channel": "nightly",
"html.validate.scripts": true,
"git.gitlab.hosts": ["gitlab.com"],
"git.addGBlameToVirtualText": true,
"languageserver": {
"nix": {
"command": "nil",

View file

@ -169,18 +169,18 @@ vim.opt.statusline:prepend("%{coc#status()}%{get(b:,'coc_current_function','')}"
---@diagnostic disable-next-line: redefined-local
local opts = {silent = true, nowait = true}
-- Show all diagnostics
keyset("n", "<space>a", ":<C-u>CocList diagnostics<cr>", opts)
keyset("n", ",a", ":<C-u>CocList diagnostics<cr>", opts)
-- Manage extensions
keyset("n", "<space>e", ":<C-u>CocList extensions<cr>", opts)
keyset("n", ",e", ":<C-u>CocList extensions<cr>", opts)
-- Show commands
keyset("n", "<space>c", ":<C-u>CocList commands<cr>", opts)
keyset("n", ",c", ":<C-u>CocList commands<cr>", opts)
-- Find symbol of current document
keyset("n", "<space>o", ":<C-u>CocList outline<cr>", opts)
keyset("n", ",o", ":<C-u>CocList outline<cr>", opts)
-- Search workspace symbols
keyset("n", "<space>s", ":<C-u>CocList -I symbols<cr>", opts)
keyset("n", ",s", ":<C-u>CocList -I symbols<cr>", opts)
-- Do default action for next item
keyset("n", "<space>j", ":<C-u>CocNext<cr>", opts)
keyset("n", ",j", ":<C-u>CocNext<cr>", opts)
-- Do default action for previous item
keyset("n", "<space>k", ":<C-u>CocPrev<cr>", opts)
keyset("n", ",k", ":<C-u>CocPrev<cr>", opts)
-- Resume latest coc list
keyset("n", "<space>p", ":<C-u>CocListResume<cr>", opts)
keyset("n", ",<space>p", ":<C-u>CocListResume<cr>", opts)

View file

@ -1,14 +1,14 @@
local map = require('utils').map
-- split binds
map { 'n', '<A-h>', ':vertical resize -5<CR>', noremap = true, silent = true}
map { 'n', '<A-l>', ':vertical resize +5<CR>', noremap = true, silent = true}
map { 'n', '<A-j>', ':resize -5<CR>', noremap = true, silent = true}
map { 'n', '<A-k>', ':resize +5<CR>', noremap = true, silent = true}
map { 'n', '<A-h>', '<cmd>vertical resize -5<CR>', noremap = true, silent = true}
map { 'n', '<A-l>', '<cmd>vertical resize +5<CR>', noremap = true, silent = true}
map { 'n', '<A-j>', '<cmd>resize -5<CR>', noremap = true, silent = true}
map { 'n', '<A-k>', '<cmd>resize +5<CR>', noremap = true, silent = true}
map { 'n', '<A-=>', '<C-w> =', noremap = true, silent = true}
map { 'n', '<A-s>', ':vsp<CR>', noremap = true, silent = true}
map { 'n', '<C-s>', ':split<CR>', noremap = true, silent = true}
map { 'n', '<A-s>', '<cmd>vsp<CR>', noremap = true, silent = true}
map { 'n', '<C-s>', '<cmd>split<CR>', noremap = true, silent = true}
map { 'n', '<C-h>', '<C-w>h', noremap = true, silent = true}
map { 'n', '<C-j>', '<C-w>j', noremap = true, silent = true}
@ -16,34 +16,40 @@ map { 'n', '<C-k>', '<C-w>k', noremap = true, silent = true}
map { 'n', '<C-l>', '<C-w>l', noremap = true, silent = true}
-- buffer binds
map { 'n', '<leader>q', ':bd<CR>', noremap = false, silent = true}
map { 'n', '<leader>q', '<cmd>bd<CR>', noremap = false, silent = true}
-- telescope
map { 'n', '<leader>fb', '<cmd>Telescope buffers<CR>', noremap = false, silent = true}
map { 'n', '<leader>ff', '<cmd>Telescope find_files<CR>', noremap = false, silent = true}
map { 'n', '<leader>fs', '<cmd>Telescope live_grep<CR>', noremap = false, silent = true}
map { 'n', '<leader>fr', '<cmd>Telescope registers<CR>', noremap = false, silent = true}
map { 'n', '<leader>pp', '<cmd>lua require\'telescope\'.extensions.projects.projects{}<cr>', noremap = false, silent = true}
map { 'n', '<leader>b', '<cmd>Telescope buffers<CR>', noremap = false, silent = true}
--map { 'n', '<leader>ff', '<cmd>Telescope find_files<CR>', noremap = false, silent = true}
map { 'n', '<leader>s', '<cmd>Telescope live_grep<CR>', noremap = false, silent = true}
map { 'n', '<C-p>', '<cmd>Telescope registers<CR>', noremap = false, silent = true}
--map { 'n', '<leader>pp', '<cmd>lua require\'telescope\'.extensions.projects.projects{}<cr>', noremap = false, silent = true}
-- tab binds
map { 'n', '<C-t>', ':tabnew<CR>', noremap = false, silent = true}
map { 'n', '<C-t>', '<cmd>tabnew<CR>', noremap = false, silent = true}
map { 'n', '<C-Left>', '<cmd>tabprevious<CR>', noremap = false, silent = true}
map { 'n', '<C-Right>', '<cmd>tabnext<CR>', noremap = false, silent = true}
-- copy paste
map { 'v', '<C-c>', '"+y', noremap = true, silent = true}
map { 'n', '<C-b>', '"+P', noremap = false, silent = true}
--map { 'n', '<C-b>', '"+P', noremap = false, silent = true}
-- sudo :w
map { 'c', 'w!!', 'w !sudo tee > /dev/null %', noremap = false, silent = false}
-- vimspector
map { 'n', '<leader>di', '<Plug>VimspectorBalloonEval', noremap = false, silent = false }
map { 'x', '<leader>di', '<Plug>VimspectorBalloonEval', noremap = false, silent = false }
-- terminal
-- map { 'n', '<leader>t', ':term<CR>', noremap = false, silent = true}
-- map { 't', '<C-b>', '<C-\\><C-n>', noremap = true, silent = true}
-- plugins - commentary
map { 'n', '<leader>c', ':Commentary<CR>', noremap = false, silent = true}
map { 'n', '<leader>c', '<cmd>Commentary<CR>', noremap = false, silent = true}
-- plugins - vista
map { 'n', '<leader>v', ':Vista!!<CR>', noremap = false, silent = true}
map { 'n', '<leader>v', '<cmd>Vista!!<CR>', noremap = false, silent = true}
-- plugins - nnn
map { 'n', '<tab>', '::NnnPicker %:p:h<CR>', noremap = true, silent = true}
map { 'n', '<tab>', '<cmd>:NnnPicker %:p:h<CR>', noremap = true, silent = true}
map { 'n', '<s-tab>', '<cmd>:NnnExplorer %:p:h<CR>', noremap = true, silent = true}
-- plugins - terminal
map {"n", "<leader>gg", "<cmd>lua _lazygit_toggle()<CR>", {noremap = true, silent = true}}

View file

@ -2,8 +2,8 @@ require('lualine').setup {
options = {
icons_enabled = true,
theme = 'gruvbox',
component_separators = { left = '', right = ''},
section_separators = { left = '', right = ''},
--component_separators = { left = '', right = ''},
--section_separators = { left = '', right = ''},
disabled_filetypes = {},
always_divide_middle = true,
},

View file

@ -7,6 +7,9 @@ require("noice").setup({
["cmp.entry.get_documentation"] = true,
},
},
messages = {
view = "mini"
},
-- you can enable a preset for easier configuration
presets = {
bottom_search = true, -- use a classic bottom cmdline for search
@ -16,3 +19,7 @@ require("noice").setup({
lsp_doc_border = false, -- add a border to hover docs and signature help
},
})
require("notify").setup({
stages = "static",
max_width = 70,
})

View file

@ -7,11 +7,12 @@ require('filetypes')
local opt = vim.opt
-- load plugin luas (idk how to do that autmagically)
--require('plugin.treesitter')
require('plugin.nnn')
require('plugin.rainbow')
require('plugin.terminal')
require('plugin.project')
require('plugin.notice')
require('plugin.noice')
require('plugin.telescope')
@ -20,9 +21,9 @@ require('plugin.telescope')
require('coc')
-- color stuff
opt.termguicolors = true -- 24bit color
vim.g.gruvbox_italic = 1
vim.cmd ':colorscheme gruvbox'
opt.termguicolors = true -- 24bit color
opt.background = 'dark' -- dark gruvbox
--vimspector
vim.g.vimspector_base_dir = vim.env.HOME .. "/.local/share/nvim/vimspector"

View file

@ -1,4 +1,4 @@
{ pkgs, config, inputs, ... }:
{ pkgs, config, lib, inputs, ... }:
{
home.packages = with pkgs;[
python3 # ultisnips
@ -19,9 +19,6 @@
home.file.".config/nvim".source = ./config;
home.file.".config/nvim".recursive = true;
programs.neovim =
let
conf = inputs.self.nixosConfigurations.enterprise.config.programs.neovim.configure;
in
{
enable = true;
package = pkgs.neovim-nightly;
@ -43,10 +40,10 @@
version = "1.0.0";
src = inputs.notify-nvim;
};
notice-nvim = pkgs.vimUtils.buildVimPlugin {
pname = "notice-nvim";
noice-nvim = pkgs.vimUtils.buildVimPlugin {
pname = "noice-nvim";
version = "1.0.0";
src = inputs.notice-nvim;
src = inputs.noice-nvim;
};
#coc-nvim = pkgs.vimUtils.buildVimPlugin {
# name = "coc-nvim";
@ -81,12 +78,12 @@
undotree
vim-pandoc
vim-pandoc-syntax
ultisnips
#ultisnips
#dart-vim
nvim-treesitter
nvim-treesitter.withAllGrammars
notify-nvim
notice-nvim
noice-nvim
nui-nvim
@ -106,7 +103,7 @@
#coc-vimtex
#coc-vimlsp
#coc-vetur # vue
coc-ultisnips
#coc-ultisnips
coc-tsserver
#coc-tslint-plugin
#coc-tslint

View file

@ -15,7 +15,8 @@
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
set-option -g default-terminal "tmux-256color"
set -as terminal-overrides ',xterm*:Tc:sitm=\E[3m'
'';
};
}