Skip to content

Commit

Permalink
save lvim config
Browse files Browse the repository at this point in the history
  • Loading branch information
teaglebuilt committed Apr 7, 2023
1 parent de317e5 commit 79c8c9f
Show file tree
Hide file tree
Showing 8 changed files with 652 additions and 120 deletions.
90 changes: 52 additions & 38 deletions Brewfile
Expand Up @@ -9,26 +9,65 @@ tap 'aws/tap'
tap "timescale/tap"
tap "github/gh"

brew "ansifilter"
brew "ansible"
brew "asdf"
brew "awscli"
brew "awslogs"
brew "cmake"

### Core
brew "coreutils"
brew "gnupg"
brew "cmake"

### Languages
brew "gcc"
brew "go"
brew "lua"
brew "luarocks"
brew "node", link: false
brew "php@7.3"
brew "ansible"
brew "terraform"

### Language Support
brew "hudochenkov/sshpass/sshpass" # ansible
brew "pyenv"
brew "pyenv-virtualenv"
brew "pyenv-virtualenvwrapper"

### Shell
brew "zellij"
brew "zplug"
brew "direnv"
brew "asdf"
brew "starship"
brew "diff-so-fancy"
brew "fzf"
brew "gcc"
brew "ansifilter"
brew "tree"
brew "vim"

### Clients
brew "git"
brew "gnupg"
brew "go"
brew "httpie"
brew "multipass"
brew "mysql-client"
brew "awscli"
brew "awslogs"
brew "sqlite"
brew "websocat"
brew "redis"

### Tools
brew "gradle"
brew "grunt-cli"
brew "helm"
brew "htop"
brew "httpie"
brew "jq"
brew "nmap"
brew "sops"
brew "telnet"
brew "pre-commit"
brew "watch"
brew "wget"

### Kubernetes
brew "kind"
brew "kubernetes-cli"
brew "kustomize"
Expand All @@ -37,35 +76,10 @@ brew "k3d"
brew "k9s"
brew "kubeval"
brew "minikube"
brew "multipass"
brew "mysql-client"
brew "mysql@5.7", restart_service: true
brew "nmap"
brew "lua"
brew "luarocks"
brew "node", link: false
brew "nvm"
brew "php@7.3"
brew "pre-commit"

### Services
brew "postgresql", restart_service: true
brew "pyenv"
brew "pyenv-virtualenv"
brew "pyenv-virtualenvwrapper"
brew "redis"
brew "sops"
brew "hudochenkov/sshpass/sshpass"
brew "starship"
brew "sqlite"
brew "telnet"
brew "terraform"
brew "tmux"
brew "tree"
brew "vim"
brew "watch"
brew "wget"
brew "websocat"
brew 'zsh-syntax-highlighting'
brew "zsh-autosuggestions"
brew "mysql@5.7", restart_service: true

cask "multipass"
cask "font-caskaydia-cove-nerd-font"
158 changes: 83 additions & 75 deletions config/lvim/config.lua
Expand Up @@ -10,15 +10,33 @@ an executable

-- general
lvim.log.level = "warn"
lvim.format_on_save = true
lvim.colorscheme = "onedarker"
lvim.format_on_save.enabled = false
lvim.colorscheme = "lunar"


vim.opt.wrap = true
vim.opt.smartcase = false
vim.opt.smartindent = false

-- to disable icons and use a minimalist setup, uncomment the following
-- lvim.use_icons = false

-- keymappings [view all the defaults by pressing <leader>Lk]
lvim.leader = "space"
-- add your own keymapping
lvim.keys.normal_mode["<C-s>"] = ":w<cr>"
lvim.keys.normal_mode["<C-t>"] = false

lvim.builtin.which_key.mappings["t"] = {
name = "+Terminal",
h = { "<cmd>ToggleTerm direction=horizontal size=10<cr>", "Toggle Horizontal Terminal" },
v = { "<cmd>ToggleTerm direction=vertical size=60<cr>", "Toggle Vertical Terminal" },
f = { "<cmd>ToggleTerm direction=float<cr>", "Toggle Float Terminal" },
t = { "<cmd>ToggleTerm direction=tab<cr>", "Toggle Tab Terminal" },
}


-- lvim.keys.normal_mode["<S-h>"] = ":BufferLineCyclePrev<CR>"
-- unmap a default keymapping
-- vim.keymap.del("n", "<C-Up>")
-- override a default keymapping
Expand All @@ -42,6 +60,10 @@ lvim.keys.normal_mode["<C-s>"] = ":w<cr>"
-- },
-- }

-- Change theme settings
-- lvim.builtin.theme.options.dim_inactive = true
-- lvim.builtin.theme.options.style = "storm"

-- Use which-key to add extra bindings with the leader-key prefix
-- lvim.builtin.which_key.mappings["P"] = { "<cmd>Telescope projects<CR>", "Projects" }
-- lvim.builtin.which_key.mappings["t"] = {
Expand All @@ -51,14 +73,13 @@ lvim.keys.normal_mode["<C-s>"] = ":w<cr>"
-- d = { "<cmd>Trouble document_diagnostics<cr>", "Diagnostics" },
-- q = { "<cmd>Trouble quickfix<cr>", "QuickFix" },
-- l = { "<cmd>Trouble loclist<cr>", "LocationList" },
-- w = { "<cmd>Trouble workspace_diagnostics<cr>", "Wordspace Diagnostics" },
-- w = { "<cmd>Trouble workspace_diagnostics<cr>", "Workspace Diagnostics" },
-- }

-- TODO: User Config for predefined plugins
-- After changing plugin config exit and reopen LunarVim, Run :PackerInstall :PackerCompile
lvim.builtin.alpha.active = true
lvim.builtin.alpha.mode = "dashboard"
lvim.builtin.notify.active = true
lvim.builtin.terminal.active = true
lvim.builtin.nvimtree.setup.view.side = "left"
lvim.builtin.nvimtree.setup.renderer.icons.show.git = false
Expand All @@ -77,29 +98,53 @@ lvim.builtin.treesitter.ensure_installed = {
"rust",
"java",
"yaml",
"hcl"
}

lvim.builtin.treesitter.ignore_install = { "haskell" }
lvim.builtin.treesitter.highlight.enabled = true
lvim.builtin.treesitter.highlight.enable = true

-- generic LSP settings
vim.list_extend(lvim.lsp.automatic_configuration.skipped_servers, {
"angularjs",
"graphql",
"csharp_ls",
"ember",
"reason_ls",
"rome",
"sourcery",
"verible",
"phpactor",
"psalm",
"sorbet"
}
)
-- -- make sure server will always be installed even if the server is in skipped_servers list
-- lvim.lsp.installer.setup.ensure_installed = {
-- "sko_lua",
-- "jsonls",
-- }
-- -- change UI setting of `LspInstallInfo`
-- -- see <https://github.com/williamboman/nvim-lsp-installer#default-configuration>
-- lvim.lsp.installer.setup.ui.check_outdated_servers_on_open = false
-- lvim.lsp.installer.setup.ui.border = "rounded"
-- lvim.lsp.installer.setup.ui.keymaps = {
-- uninstall_server = "d",
-- toggle_server_expand = "o",
-- }

-- ---@usage disable automatic installation of servers
<<<<<<< HEAD
-- lvim.lsp.automatic_servers_installation = false
-- lvim.lsp.installer.setup.automatic_installation = false

=======
lvim.lsp.automatic_servers_installation = true
>>>>>>> 234a7c57e0ca58a051183251fb87629345d65124
-- ---configure a server manually. !!Requires `:LvimCacheReset` to take effect!!
-- ---see the full default list `:lua print(vim.inspect(lvim.lsp.automatic_configuration.skipped_servers))`
-- vim.list_extend(lvim.lsp.automatic_configuration.skipped_servers, { "pyright" })
-- local opts = {} -- check the lspconfig documentation for a list of all possible options
-- require("lvim.lsp.manager").setup("pyright", opts)

-- ---remove a server from the skipped list, e.g. eslint, or emmet_ls. !!Requires `:LvimCacheReset` to take effect!!
-- ---`:LvimInfo` lists which server(s) are skiipped for the current filetype
-- vim.tbl_map(function(server)
-- ---`:LvimInfo` lists which server(s) are skipped for the current filetype
-- lvim.lsp.automatic_configuration.skipped_servers = vim.tbl_filter(function(server)
-- return server ~= "emmet_ls"
-- end, lvim.lsp.automatic_configuration.skipped_servers)

Expand All @@ -113,72 +158,35 @@ lvim.lsp.automatic_servers_installation = true
-- buf_set_option("omnifunc", "v:lua.vim.lsp.omnifunc")
-- end

-- -- set a formatter, this will override the language server formatting capabilities (if it exists)
-- local formatters = require "lvim.lsp.null-ls.formatters"
-- formatters.setup {
-- { command = "black", filetypes = { "python" } },
-- { command = "isort", filetypes = { "python" } },
-- {
-- -- each formatter accepts a list of options identical to https://github.com/jose-elias-alvarez/null-ls.nvim/blob/main/doc/BUILTINS.md#Configuration
-- command = "prettier",
-- ---@usage arguments to pass to the formatter
-- -- these cannot contain whitespaces, options such as `--line-width 80` become either `{'--line-width', '80'}` or `{'--line-width=80'}`
-- extra_args = { "--print-with", "100" },
-- ---@usage specify which filetypes to enable. By default a providers will attach to all the filetypes it supports.
-- filetypes = { "typescript", "typescriptreact" },
-- },
-- }

-- -- set additional linters
-- local linters = require "lvim.lsp.null-ls.linters"
-- linters.setup {
-- { command = "flake8", filetypes = { "python" } },
-- {
-- -- each linter accepts a list of options identical to https://github.com/jose-elias-alvarez/null-ls.nvim/blob/main/doc/BUILTINS.md#Configuration
-- command = "shellcheck",
-- ---@usage arguments to pass to the formatter
-- -- these cannot contain whitespaces, options such as `--line-width 80` become either `{'--line-width', '80'}` or `{'--line-width=80'}`
-- extra_args = { "--severity", "warning" },
-- },
-- {
-- command = "codespell",
-- ---@usage specify which filetypes to enable. By default a providers will attach to all the filetypes it supports.
-- filetypes = { "javascript", "python" },
-- },
-- }

-- Additional Plugins
lvim.plugins = {
<<<<<<< HEAD
=======
{ "kyazdani42/web-devicons" },
>>>>>>> 234a7c57e0ca58a051183251fb87629345d65124
{
"folke/trouble.nvim",
cmd = "TroubleToggle",
},
<<<<<<< HEAD
{
'nvim-lualine/lualine.nvim',
requires = { 'kyazdani42/nvim-web-devicons', opt = true }
}
}

require 'nvim-web-devicons'.setup {
override = {
terraform = {
icon = "",
color = "#428850",
cterm_color = "65",
name = "terraform"
}
};
default = true;
}
=======
{
"folke/trouble.nvim",
cmd = "TroubleToggle",
},
"williamboman/mason.nvim",
"sheerun/vim-polyglot",
{ "towolf/vim-helm" },
{ "iamcco/markdown-preview.nvim" },
{
"rmagatti/goto-preview",
config = function()
require('goto-preview').setup {
width = 120; -- Width of the f loating window
height = 25; -- Height of the floating window
default_mappings = false; -- Bind default mappings
debug = false; -- Print debug information
opacity = nil; -- 0-100 opacity level of the floating window where 100 is fully transparent.
post_open_hook = nil -- A function taking two arguments, a buffer and a window to be ran as a hook.
-- You can use "default_mappings = true" setup option
-- Or explicitly set keybindings
-- vim.cmd("nnoremap gpd <cmd>lua require('goto-preview').goto_preview_definition()<CR>")
-- vim.cmd("nnoremap gpi <cmd>lua require('goto-preview').goto_preview_implementation()<CR>")
-- vim.cmd("nnoremap gP <cmd>lua require('goto-preview').close_all_win()<CR>")
}
end
},
}

>>>>>>> 234a7c57e0ca58a051183251fb87629345d65124
-- Autocommands (https://neovim.io/doc/user/autocmd.html)
-- vim.api.nvim_create_autocmd("BufEnter", {
-- pattern = { "*.json", "*.jsonc" },
Expand Down
3 changes: 0 additions & 3 deletions config/lvim/lsp-settings/pyright.json

This file was deleted.

25 changes: 25 additions & 0 deletions config/lvim/lua/user/python.lua
@@ -0,0 +1,25 @@
local formatters = require "lvim.lsp.null-ls.formatters"
formatters.setup {
{ command = "black", filetypes = { "python" } },
{ command = "isort", filetypes = { "python" } },
}

-- -- set additional linters
local linters = require "lvim.lsp.null-ls.linters"
linters.setup {
{ command = "ruff", filetypes = { "python" } },
}

-- set lsp
vim.list_extend(lvim.lsp.automatic_configuration.skipped_servers, { "pyright", "ruff_lsp" })
local lsp_manager = require("lvim.lsp.manager")

lsp_manager.setup("pyright", {
on_init = require("lvim.lsp").common_on_init,
capabilities = require("lvim.lsp").common_capabilities(),
})

lsp_manager.setup("ruff_lsp", {
on_init = require("lvim.lsp").common_on_init,
capabilities = require("lvim.lsp").common_capabilities(),
})
4 changes: 0 additions & 4 deletions config/lvim/lua/user/toggleterm.lua

This file was deleted.

18 changes: 18 additions & 0 deletions config/lvim/lua/user/typescript.lua
@@ -0,0 +1,18 @@
local formatters = require "lvim.lsp.null-ls.formatters"
formatters.setup {
{
-- each formatter accepts a list of options identical to https://github.com/jose-elias-alvarez/null-ls.nvim/blob/main/doc/BUILTINS.md#Configuration
command = "prettier",
---@usage arguments to pass to the formatter
-- these cannot contain whitespaces, options such as `--line-width 80` become either `{'--line-width', '80'}` or `{'--line-width=80'}`
extra_args = { "--print-with", "100" },
---@usage specify which filetypes to enable. By default a providers will attach to all the filetypes it supports.
filetypes = { "typescript", "typescriptreact" },
},
}

-- -- set additional linters
local linters = require "lvim.lsp.null-ls.linters"
linters.setup {
{ command = "prettier", filetypes = { "typescript, typescriptreact" } },
}
Empty file removed config/lvim/lv-settings.lua
Empty file.

0 comments on commit 79c8c9f

Please sign in to comment.