mirror of
https://github.com/iofq/nvim.nix.git
synced 2026-01-23 08:55:16 -06:00
tonight's rice
This commit is contained in:
parent
bff0f4c78b
commit
26575fa66e
9 changed files with 102 additions and 22 deletions
|
|
@ -3,14 +3,6 @@ if vim.g.did_load_colors_plugin then
|
|||
end
|
||||
vim.g.did_load_colors_plugin = true
|
||||
|
||||
require('rose-pine').setup {
|
||||
variant = 'moon',
|
||||
styles = {
|
||||
bold = false,
|
||||
italic = false,
|
||||
transparency = true,
|
||||
},
|
||||
}
|
||||
require('nightfox').setup {
|
||||
options = {
|
||||
transparent = true, -- Disable setting background
|
||||
|
|
|
|||
|
|
@ -10,3 +10,4 @@ vim.keymap.set('n', '<C-u>', '<C-u>zz')
|
|||
vim.keymap.set('n', '<C-f>', '<C-f>zz')
|
||||
vim.keymap.set('n', '<C-b>', '<C-b>zz')
|
||||
vim.keymap.set({ 'v', 'i' }, 'wq', '<esc>l', { noremap = true, silent = true })
|
||||
vim.keymap.set('n', '<leader>x', '"rd', { remap = true, silent = true })
|
||||
|
|
|
|||
|
|
@ -8,6 +8,28 @@ local lspconfig = require('lspconfig')
|
|||
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||
|
||||
lspconfig.gopls.setup {
|
||||
settings = {
|
||||
gopls = {
|
||||
gofumpt = true,
|
||||
codelenses = {
|
||||
gc_details = true,
|
||||
test = true,
|
||||
},
|
||||
analyses = {
|
||||
unusedvariable = true,
|
||||
shadow = true,
|
||||
},
|
||||
hints = {
|
||||
assignVariableTypes = true,
|
||||
constantValues = true,
|
||||
functionTypeParameters = true,
|
||||
rangeVariableTypes = true,
|
||||
},
|
||||
usePlaceholders = true,
|
||||
staticcheck = true,
|
||||
},
|
||||
},
|
||||
capabilities = capabilities,
|
||||
on_attach = function(_, bufnr)
|
||||
capabilities = capabilities
|
||||
vim.api.nvim_command('au BufWritePre <buffer> lua vim.lsp.buf.format { async = false }')
|
||||
|
|
@ -15,6 +37,7 @@ lspconfig.gopls.setup {
|
|||
}
|
||||
lspconfig.pyright.setup { capabilities = capabilities }
|
||||
lspconfig.nil_ls.setup { capabilities = capabilities }
|
||||
lspconfig.phpactor.setup { capabilities = capabilities }
|
||||
|
||||
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, { desc = 'Prev diagnostic' })
|
||||
vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { desc = 'Next diagnostic' })
|
||||
|
|
@ -82,6 +105,14 @@ 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', '<space>df', function()
|
||||
vim.lsp.buf.format { async = true }
|
||||
end, { buffer = ev.buf, noremap = true, silent = true, desc = 'LSP format' })
|
||||
|
|
@ -102,3 +133,12 @@ vim.api.nvim_create_autocmd('LspAttach', {
|
|||
end
|
||||
end,
|
||||
})
|
||||
|
||||
local none = require('null-ls')
|
||||
none.setup({
|
||||
sources = {
|
||||
none.builtins.diagnostics.golangci_lint,
|
||||
none.builtins.diagnostics.puppet_lint,
|
||||
none.builtins.diagnostics.yamllint,
|
||||
},
|
||||
})
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ require('which-key').setup {
|
|||
}
|
||||
require('trouble').setup {}
|
||||
require('eyeliner').setup {}
|
||||
require('dressing').setup {}
|
||||
require('markview').setup()
|
||||
require('scope').setup {}
|
||||
require('neoclip').setup { default_register = '+' }
|
||||
|
|
@ -31,3 +30,11 @@ vim.keymap.set(
|
|||
'<cmd>Telescope neoclip<CR>',
|
||||
{ noremap = true, silent = true, desc = 'Pick clipboard history' }
|
||||
)
|
||||
local snipe = require("snipe")
|
||||
snipe.setup({
|
||||
ui = {
|
||||
position = "center",
|
||||
},
|
||||
sort = "last",
|
||||
})
|
||||
vim.keymap.set('n', '<leader><leader>', snipe.open_buffer_menu, { noremap = true, silent = true, desc = 'Pick buffers (snipe.nvim)' })
|
||||
|
|
|
|||
|
|
@ -2,7 +2,12 @@ if vim.g.did_load_neogit_plugin then
|
|||
return
|
||||
end
|
||||
vim.g.did_load_neogit_plugin = true
|
||||
|
||||
require("diffview").setup({
|
||||
enhanced_diff_hl = true,
|
||||
default_args = {
|
||||
DiffviewOpen = {"--imply-local"},
|
||||
},
|
||||
})
|
||||
local neogit = require('neogit')
|
||||
neogit.setup {
|
||||
disable_builtin_notifications = true,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue