Mess
This commit is contained in:
213
.config/nvim/init.lua
Normal file
213
.config/nvim/init.lua
Normal file
@@ -0,0 +1,213 @@
|
||||
require 'plugins'
|
||||
|
||||
|
||||
require 'popup'
|
||||
|
||||
|
||||
vim.g.solarized_italic_comments = true
|
||||
vim.g.solarized_italic_keywords = true
|
||||
vim.g.solarized_italic_functions = true
|
||||
vim.g.solarized_italic_variables = false
|
||||
vim.g.solarized_contrast = true
|
||||
vim.g.solarized_borders = false
|
||||
vim.g.solarized_disable_background = false
|
||||
require('solarized').set()
|
||||
|
||||
|
||||
require('nvim-treesitter.configs').setup {
|
||||
ensure_installed = { "c", "lua", "rust", "java", "python", "javascript", "typescript" },
|
||||
sync_install = false,
|
||||
ignore_install = { },
|
||||
|
||||
highlight = {
|
||||
enable = true,
|
||||
disable = { },
|
||||
additional_vim_regex_highlighting = false,
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
require('feline').setup {
|
||||
theme = require('feline.solarized'),
|
||||
force_inactive = {
|
||||
filetypes = {
|
||||
'^neo\\-tree$',
|
||||
'^aerial$',
|
||||
'^packer$',
|
||||
'^startify$',
|
||||
'^fugitive$',
|
||||
'^fugitiveblame$',
|
||||
'^qf$',
|
||||
'^help$'
|
||||
},
|
||||
buftypes = {
|
||||
'^terminal$'
|
||||
},
|
||||
bufnames = {
|
||||
'neo\\-.*',
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
require('nvim-lsp-installer').setup {}
|
||||
require('lspconfig/settings')
|
||||
|
||||
|
||||
require('window-picker').setup({
|
||||
autoselect_one = true,
|
||||
selection_chars = 'ABCDEFGHIJKLMNOP',
|
||||
filter_rules = {
|
||||
bo = {
|
||||
filetype = { 'NvimTree', "neo-tree", "notify", 'aerial' },
|
||||
buftype = { 'terminal' }
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
vim.cmd([[ let g:neo_tree_remove_legacy_commands = 1 ]])
|
||||
require('neo-tree').setup({
|
||||
close_if_last_window = true,
|
||||
window = {
|
||||
width = 30,
|
||||
mappings = {
|
||||
["<cr>"] = "open_with_window_picker",
|
||||
["S"] = "split_with_window_picker",
|
||||
["s"] = "vsplit_with_window_picker"
|
||||
}
|
||||
},
|
||||
filesystem = {
|
||||
filtered_items = {
|
||||
visible = true
|
||||
},
|
||||
follow_current_file = true,window = {
|
||||
mappings = {
|
||||
["/"] = "noop",
|
||||
["g/"] = "fuzzy_finder",
|
||||
["f"] = "noop",
|
||||
["ff"] = function() vim.cmd([[Telescope find_files]]) end,
|
||||
["fg"] = function() vim.cmd([[Telescope live_grep]]) end
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
vim.keymap.set("n", "f", "<cmd>Neotree focus<CR>", opts)
|
||||
|
||||
|
||||
require('smart-splits')
|
||||
vim.keymap.set("n", "<C-Left>", require('smart-splits').move_cursor_left)
|
||||
vim.keymap.set("n", "<C-Down>", require('smart-splits').move_cursor_down)
|
||||
vim.keymap.set("n", "<C-Up>", require('smart-splits').move_cursor_up)
|
||||
vim.keymap.set("n", "<C-Right>", require('smart-splits').move_cursor_right)
|
||||
vim.keymap.set("n", "<C-S-Up>", require('smart-splits').resize_up)
|
||||
vim.keymap.set("n", "<C-S-Down>", require('smart-splits').resize_down)
|
||||
vim.keymap.set("n", "<C-S-Left>", require('smart-splits').resize_left)
|
||||
vim.keymap.set("n", "<C-S-Right>", require('smart-splits').resize_right)
|
||||
|
||||
|
||||
require('bufdelete')
|
||||
|
||||
|
||||
local colors = require('solarized.colors')
|
||||
require('bufferline').setup{
|
||||
options = {
|
||||
close_command = "Bdelete %d",
|
||||
right_mouse_command = "Bdelete %d",
|
||||
offsets = {
|
||||
{filetype = "neo-tree", text = "File Explorer", padding = 1},
|
||||
{filetype = "aerial", text = "Outline", padding = 1}
|
||||
},
|
||||
enforce_regular_tabs = true,
|
||||
separator_style = 'slant'
|
||||
},
|
||||
highlights = {
|
||||
separator = {
|
||||
guifg = colors.bg_alt
|
||||
},
|
||||
separator_visible = {
|
||||
guifg = colors.bg_alt
|
||||
},
|
||||
separator_selected = {
|
||||
guifg = colors.bg_alt
|
||||
}
|
||||
}
|
||||
}
|
||||
vim.keymap.set("n", "<S-Right>", "<cmd>bnext<CR>", opts)
|
||||
vim.keymap.set("n", "<S-Left>", "<cmd>bprevious<CR>", opts)
|
||||
vim.keymap.set("n", "q", "<cmd>Bdelete<CR>", opts)
|
||||
|
||||
|
||||
require('nvim-autopairs').setup()
|
||||
|
||||
|
||||
require('gitsigns').setup()
|
||||
|
||||
|
||||
require('cinnamon').setup()
|
||||
|
||||
|
||||
require('aerial').setup({
|
||||
close_behavior = 'global',
|
||||
open_automatic = true,
|
||||
placement_editor_edge = true,
|
||||
width = 30,
|
||||
on_attach = function(bufnr)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', 't',
|
||||
require('map_utils').lua_fn(function()
|
||||
vim.tbl_map(function(buf)
|
||||
if vim.api.nvim_buf_get_option(buf, 'filetype') == 'aerial' then
|
||||
vim.tbl_map(function(win)
|
||||
vim.api.nvim_set_current_win(win)
|
||||
end, vim.fn.win_findbuf(buf))
|
||||
end
|
||||
end, vim.api.nvim_list_bufs())
|
||||
end),
|
||||
{})
|
||||
end
|
||||
})
|
||||
|
||||
|
||||
require('guess-indent').setup()
|
||||
|
||||
|
||||
local actions = require("telescope.actions")
|
||||
require('telescope').setup({
|
||||
defaults = {
|
||||
mappings = {
|
||||
n = {
|
||||
["S"] = actions.file_split,
|
||||
["s"] = actions.file_vsplit,
|
||||
}
|
||||
},
|
||||
get_selection_window = require('window-picker').pick_window
|
||||
},
|
||||
pickers = {
|
||||
find_files = {
|
||||
find_command = {"fd", "--type", "f", "--strip-cwd-prefix", "--hidden"}
|
||||
},
|
||||
live_grep = {
|
||||
vimgrep_arguments = {"rg", "--color=never", "--no-heading", "--with-filename", "--line-number", "--column", "--smart-case", "--hidden"}
|
||||
},
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
vim.o.clipboard = 'unnamedplus'
|
||||
vim.o.expandtab = true
|
||||
vim.o.fileencoding = 'utf-8'
|
||||
vim.o.ignorecase = true
|
||||
vim.o.mouse = 'a'
|
||||
vim.o.showmode = false
|
||||
vim.o.number = true
|
||||
vim.o.shiftwidth = 2
|
||||
vim.o.signcolumn = 'yes'
|
||||
vim.o.smartcase = true
|
||||
vim.o.spelllang = 'en'
|
||||
vim.o.tabstop = 2
|
||||
|
||||
|
||||
if vim.fn.expand('%') == '' then
|
||||
require("neo-tree.command")._command(vim.fn.getcwd())
|
||||
else
|
||||
require("neo-tree.command")._command("show", vim.fn.getcwd())
|
||||
end
|
||||
Reference in New Issue
Block a user