Skip to content

Commit

Permalink
add nvim min
Browse files Browse the repository at this point in the history
  • Loading branch information
iofq committed Aug 16, 2024
1 parent 26575fa commit 85f2c16
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 31 deletions.
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
matrix:
include:
- package_name: nvim
- package:name: nvim-min
steps:
- uses: actions/checkout@v3
- uses: DeterminateSystems/nix-installer-action@main
Expand Down
1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
packages = rec {
default = nvim;
nvim = pkgs.nvim-pkg;
nvim-min = pkgs.nvim-min-pkg;
};
devShells = {
default = shell;
Expand Down
9 changes: 7 additions & 2 deletions nix/neovim-overlay.nix
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,9 @@ with final.pkgs.lib; let
yamllint
puppet-lint
gopls
pyright
python312Packages.jedi-language-server
nil
phpactor
golangci-lint
];
in {
nvim-pkg = mkNeovim {
Expand All @@ -95,6 +94,12 @@ in {
inherit extraPackages;
};

nvim-min-pkg = mkNeovim {
plugins = all-plugins;
appName = "nvim";
extraPackages = [];
};

nvim-luarc-json = final.mk-luarc-json {
plugins = all-plugins;
};
Expand Down
8 changes: 4 additions & 4 deletions nvim/after/plugin/color.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
vim.cmd('colorscheme terafox')
vim.api.nvim_set_hl(0, 'GitSignsAdd', { fg = "green", bold = true })
vim.api.nvim_set_hl(0, 'GitSignsDelete', { fg = "red", bold = true})
vim.api.nvim_set_hl(0, 'GitSignsChange', { fg = "green", bold = true})
vim.api.nvim_set_hl(0, 'GitSignsAdd', { fg = 'green', bold = true })
vim.api.nvim_set_hl(0, 'GitSignsDelete', { fg = 'red', bold = true })
vim.api.nvim_set_hl(0, 'GitSignsChange', { fg = 'green', bold = true })
vim.api.nvim_set_hl(0, 'EyelinerPrimary', { underline = true })
vim.api.nvim_set_hl(0, 'EyelinerSecondary', { underline = true })

Expand All @@ -22,7 +22,7 @@ vim.keymap.set(
ts.extensions.aerial.aerial,
{ noremap = true, silent = true, desc = 'Fuzzy find treesitter objects' }
)
ts.load_extension("scope")
ts.load_extension('scope')
vim.keymap.set(
'n',
'<leader>fb',
Expand Down
26 changes: 10 additions & 16 deletions nvim/plugin/lsp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ lspconfig.gopls.setup {
vim.api.nvim_command('au BufWritePre <buffer> lua vim.lsp.buf.format { async = false }')
end,
}
lspconfig.pyright.setup { capabilities = capabilities }
lspconfig.jedi_language_server.setup { capabilities = capabilities }
lspconfig.nil_ls.setup { capabilities = capabilities }
lspconfig.phpactor.setup { capabilities = capabilities }

Expand Down Expand Up @@ -105,14 +105,9 @@ vim.api.nvim_create_autocmd('LspAttach', {
vim.lsp.codelens.run,
{ buffer = ev.buf, noremap = true, silent = true, desc = 'LSP codelens' }
)
vim.keymap.set(
'n',
'<leader>dh',
function()
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled())
end,
{ buffer = ev.buf, noremap = true, silent = true, desc = 'LSP hints toggle' }
)
vim.keymap.set('n', '<leader>dh', function()
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled())
end, { buffer = ev.buf, noremap = true, silent = true, desc = 'LSP hints toggle' })
vim.keymap.set('n', '<space>df', function()
vim.lsp.buf.format { async = true }
end, { buffer = ev.buf, noremap = true, silent = true, desc = 'LSP format' })
Expand All @@ -135,10 +130,9 @@ vim.api.nvim_create_autocmd('LspAttach', {
})

local none = require('null-ls')
none.setup({
sources = {
none.builtins.diagnostics.golangci_lint,
none.builtins.diagnostics.puppet_lint,
none.builtins.diagnostics.yamllint,
},
})
none.setup {
sources = {
none.builtins.diagnostics.puppet_lint,
none.builtins.diagnostics.yamllint,
},
}
17 changes: 11 additions & 6 deletions nvim/plugin/misc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,16 @@ vim.keymap.set(
'<cmd>Telescope neoclip<CR>',
{ noremap = true, silent = true, desc = 'Pick clipboard history' }
)
local snipe = require("snipe")
snipe.setup({
local snipe = require('snipe')
snipe.setup {
ui = {
position = "center",
position = 'center',
},
sort = "last",
})
vim.keymap.set('n', '<leader><leader>', snipe.open_buffer_menu, { noremap = true, silent = true, desc = 'Pick buffers (snipe.nvim)' })
sort = 'last',
}
vim.keymap.set(
'n',
'<leader><leader>',
snipe.open_buffer_menu,
{ noremap = true, silent = true, desc = 'Pick buffers (snipe.nvim)' }
)
6 changes: 3 additions & 3 deletions nvim/plugin/neogit.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ if vim.g.did_load_neogit_plugin then
return
end
vim.g.did_load_neogit_plugin = true
require("diffview").setup({
require('diffview').setup {
enhanced_diff_hl = true,
default_args = {
DiffviewOpen = {"--imply-local"},
DiffviewOpen = { '--imply-local' },
},
})
}
local neogit = require('neogit')
neogit.setup {
disable_builtin_notifications = true,
Expand Down

0 comments on commit 85f2c16

Please sign in to comment.