From 98b5988b7edf0db90736fb1fa0c89dd6bf9d75a8 Mon Sep 17 00:00:00 2001 From: Cody Hiar Date: Sun, 12 Dec 2021 12:50:50 -0700 Subject: Updates --- init.lua | 101 +++++++++++++-------------------------------------------------- 1 file changed, 21 insertions(+), 80 deletions(-) diff --git a/init.lua b/init.lua index 811b45b..20e03d3 100644 --- a/init.lua +++ b/init.lua @@ -1,3 +1,4 @@ +-- Managed by Nix -- To install everything run `:PackerSync` -- https://dev.to/voyeg3r/writing-useful-lua-functions-to-my-neovim-14ki @@ -31,8 +32,6 @@ function _G.print_table(mytable) end --- https://old.reddit.com/r/neovim/comments/lrz18i/how_to_change_colorscheme_in_lua_without_any/ -vim.g.colors_name = "nord" -- Set up spacebar as leader -- https://icyphox.sh/blog/nvim-lua/ vim.api.nvim_set_keymap('n', '', '', {}) @@ -72,6 +71,11 @@ for i, highlight in ipairs(highlights) do vim.cmd('au VimEnter * hi ' .. highlight) end +-- Set the colorscheme +vim.cmd [[ +colorscheme nord +]] + -- Along with the highlight definition for ColorColumn above, these options -- will set colored marks at certain line lengths vim.cmd [[ @@ -82,7 +86,7 @@ au BufLeave *.py call clearmatches() -- Custom commands vim.cmd [[ -command! MakeTagsPython !ctags --exclude=venv --languages=python --python-kinds=-i -R . +command! MakeTagsPython !ctags --exclude=venv --exclude=.venv --languages=python --python-kinds=-i -R . ]] -- When using tab, enter will accept the current selection and close the window @@ -152,7 +156,7 @@ return require('packer').startup(function() vim.api.nvim_set_keymap('n', 'ps', 'source ~/.config/nvim/init.luaPackerSync', { noremap = true }) end } - use 'Thornycrackers-Forks/nord-vim' + use 'arcticicestudio/nord-vim' use 'p00f/nvim-ts-rainbow' use { 'nvim-treesitter/nvim-treesitter', @@ -289,81 +293,14 @@ return require('packer').startup(function() use 'tpope/vim-surround' use 'tpope/vim-repeat' use { - 'nvim-telescope/telescope.nvim', - requires = { - {'nvim-lua/plenary.nvim'}, - {'glepnir/lspsaga.nvim'}, - {'nvim-telescope/telescope-fzf-native.nvim', run = 'make' }, - }, + 'junegunn/fzf.vim', + requires = { {'junegunn/fzf'} }, config = function() - vim.api.nvim_set_keymap('n', 'ff', "lua require('telescope.builtin').find_files({hidden=true})", { noremap = true }) - vim.api.nvim_set_keymap('n', 'fb', 'Telescope buffers', { noremap = true }) - vim.api.nvim_set_keymap('n', 'fj', 'Telescope jumplist', { noremap = true }) - vim.api.nvim_set_keymap('n', 'f/', 'Telescope live_grep', { noremap = true }) - vim.api.nvim_set_keymap('n', 'fa', 'Telescope grep_string', { noremap = true }) - vim.api.nvim_set_keymap('n', 'fg', "lua require('telescope.builtin').git_status()", { noremap = true }) - vim.api.nvim_set_keymap('n', 'ft', "lua require('telescope.builtin').tags({layout_strategy='center', only_sort_tags=true, show_line=true})", { noremap = true }) - actions = require("telescope.actions") - require("telescope").setup{ - extensions = { - fzf = { - fuzzy = false, -- false will only do exact matching - override_generic_sorter = true, -- override the generic sorter - override_file_sorter = true, -- override the file sorter - case_mode = "smart_case", -- or "ignore_case" or "respect_case" - -- the default case_mode is "smart_case" - } - }, - defaults = { - mappings = { - i = { - [""] = actions.close, - [''] = false, - }, - }, - vimgrep_arguments = { - 'rg', - '--color=never', - '--no-heading', - '--with-filename', - '--line-number', - '--column', - '--smart-case' - }, - prompt_prefix = "> ", - selection_caret = "> ", - entry_prefix = " ", - initial_mode = "insert", - selection_strategy = "reset", - sorting_strategy = "descending", - layout_strategy = "horizontal", - layout_config = { - horizontal = { - mirror = false, - }, - vertical = { - mirror = false, - }, - }, - file_sorter = require'telescope.sorters'.get_fuzzy_file, - file_ignore_patterns = {}, - generic_sorter = require'telescope.sorters'.get_generic_fuzzy_sorter, - winblend = 0, - border = {}, - borderchars = { '─', '│', '─', '│', '╭', '╮', '╯', '╰' }, - color_devicons = true, - use_less = true, - path_display = {}, - set_env = { ['COLORTERM'] = 'truecolor' }, -- default = nil, - file_previewer = require'telescope.previewers'.vim_buffer_cat.new, - grep_previewer = require'telescope.previewers'.vim_buffer_vimgrep.new, - qflist_previewer = require'telescope.previewers'.vim_buffer_qflist.new, - - -- Developer configurations: Not meant for general override - buffer_previewer_maker = require'telescope.previewers'.buffer_previewer_maker - } - } - require('telescope').load_extension('fzf') + vim.api.nvim_set_keymap('n', 'ff', "Files", { noremap = true }) + vim.api.nvim_set_keymap('n', 'fb', "Buffers", { noremap = true }) + vim.api.nvim_set_keymap('n', 'ft', "Tags", { noremap = true }) + vim.api.nvim_set_keymap('n', 'fm', "Marks", { noremap = true }) + vim.cmd([[let $FZF_DEFAULT_COMMAND = 'find . -type f -not -path "*/\.git/*" -not -path "*/\.mypy_cache/*" -not -path "*/\.venv/*" ']]) end, } use { @@ -406,7 +343,9 @@ return require('packer').startup(function() requires = { {'voldikss/vim-floaterm'} }, config = function() vim.g.floaterm_opener = "edit" - vim.g.lf_replace_netrw = 1; + vim.g.floaterm_width = 0.99 + vim.g.floaterm_height = 0.99 + -- vim.g.lf_replace_netrw = 1; vim.api.nvim_set_keymap('n', 'm', 'Lf', { noremap = true }); vim.api.nvim_set_keymap('n', 'n', 'LfWorkingDirectory', { noremap = true}); end @@ -421,7 +360,7 @@ return require('packer').startup(function() require'hop'.setup { keys = 'etovxqpdygfblzhckisuran' } end } --- The treesitter for nix doesn't do indents + -- The treesitter for nix doesn't do indents use 'LnL7/vim-nix' use { 'dense-analysis/ale', @@ -431,4 +370,6 @@ return require('packer').startup(function() } end } + use 'junegunn/goyo.vim' + use 'hashivim/vim-terraform' end) -- cgit v1.2.3