Fix stuff
This commit is contained in:
parent
52f48d1995
commit
4e1eff9b87
22
init.lua
22
init.lua
@ -128,17 +128,15 @@ require('lazy').setup({
|
|||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
{
|
-- Theme inspired by Atom
|
||||||
-- Theme inspired by Atom
|
'navarasu/onedark.nvim',
|
||||||
'navarasu/onedark.nvim',
|
priority = 1000,
|
||||||
priority = 1000,
|
config = function()
|
||||||
config = function()
|
vim.cmd.colorscheme 'onedark'
|
||||||
vim.cmd.colorscheme 'onedark'
|
end,
|
||||||
end,
|
},
|
||||||
},
|
{
|
||||||
|
|
||||||
{
|
|
||||||
-- Set lualine as statusline
|
-- Set lualine as statusline
|
||||||
'nvim-lualine/lualine.nvim',
|
'nvim-lualine/lualine.nvim',
|
||||||
-- See `:help lualine.txt`
|
-- See `:help lualine.txt`
|
||||||
@ -481,7 +479,7 @@ cmp.setup {
|
|||||||
['<C-p>'] = cmp.mapping.select_prev_item(),
|
['<C-p>'] = cmp.mapping.select_prev_item(),
|
||||||
['<C-d>'] = cmp.mapping.scroll_docs(-4),
|
['<C-d>'] = cmp.mapping.scroll_docs(-4),
|
||||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||||
['<C-Space>'] = cmp.mapping.complete {},
|
['<C-i>'] = cmp.mapping.complete {},
|
||||||
['<CR>'] = cmp.mapping.confirm {
|
['<CR>'] = cmp.mapping.confirm {
|
||||||
behavior = cmp.ConfirmBehavior.Replace,
|
behavior = cmp.ConfirmBehavior.Replace,
|
||||||
select = true,
|
select = true,
|
||||||
|
@ -71,5 +71,38 @@ vim.keymap.set("n", "<leader>s", [[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><
|
|||||||
-- Make current file executable
|
-- Make current file executable
|
||||||
vim.keymap.set("n", "<leader>x", "<cmd>!chmod +x %<CR>", { silent = true, desc = "Make current file execuable"})
|
vim.keymap.set("n", "<leader>x", "<cmd>!chmod +x %<CR>", { silent = true, desc = "Make current file execuable"})
|
||||||
|
|
||||||
|
local format_sync_grp = vim.api.nvim_create_augroup("GoFormat", {})
|
||||||
|
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||||
|
pattern = "*.go",
|
||||||
|
callback = function()
|
||||||
|
require('go.format').goimport()
|
||||||
|
end,
|
||||||
|
group = format_sync_grp,
|
||||||
|
})
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
{
|
||||||
|
"ray-x/go.nvim",
|
||||||
|
dependencies = { -- optional packages
|
||||||
|
"ray-x/guihua.lua",
|
||||||
|
"neovim/nvim-lspconfig",
|
||||||
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
require("go").setup()
|
||||||
|
end,
|
||||||
|
event = {"CmdlineEnter"},
|
||||||
|
ft = {"go", 'gomod'},
|
||||||
|
build = ':lua require("go.install").update_all_sync()' -- if you need to install/update all binaries
|
||||||
|
},
|
||||||
|
{
|
||||||
|
's1n7ax/nvim-window-picker',
|
||||||
|
name = 'window-picker',
|
||||||
|
event = 'VeryLazy',
|
||||||
|
version = '2.*',
|
||||||
|
config = function()
|
||||||
|
require'window-picker'.setup()
|
||||||
|
end,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,10 +8,10 @@ return {
|
|||||||
config = function()
|
config = function()
|
||||||
-- Lazygit
|
-- Lazygit
|
||||||
local Terminal = require('toggleterm.terminal').Terminal
|
local Terminal = require('toggleterm.terminal').Terminal
|
||||||
local defaultTerm = Terminal:new({ cmd = "zsh", hidden = true, orientation = "float" })
|
local defaultTerm = Terminal:new({ cmd = "zsh", hidden = true, direction = "float" })
|
||||||
local lazygit = Terminal:new({ cmd = "lazygit", hidden = true })
|
local lazygit = Terminal:new({ cmd = "lazygit", hidden = true, direction = "float" })
|
||||||
local pythonREPL = Terminal:new({ cmd = "python3", hidden = true })
|
local pythonREPL = Terminal:new({ cmd = "python3", hidden = true, direction = "float" })
|
||||||
local haskellREPL = Terminal:new({ cmd = "ghci", hidden = true })
|
local haskellREPL = Terminal:new({ cmd = "ghci", hidden = true, direction = "float" })
|
||||||
|
|
||||||
function _defaultterm_toggle()
|
function _defaultterm_toggle()
|
||||||
defaultTerm:toggle()
|
defaultTerm:toggle()
|
||||||
@ -45,7 +45,7 @@ return {
|
|||||||
direction = "float",
|
direction = "float",
|
||||||
float_opts = {
|
float_opts = {
|
||||||
border = "curved",
|
border = "curved",
|
||||||
highlights = { border = "Normal", background = "Normal" },
|
highlights = { border = "Normal", background = "Dark" },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user