Skip to content

Commit

Permalink
changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcin Bałazy authored and Marcin Bałazy committed Mar 4, 2023
1 parent fbad306 commit f8b4fe8
Show file tree
Hide file tree
Showing 10 changed files with 120 additions and 94 deletions.
Empty file modified .gitignore
100644 → 100755
Empty file.
Empty file modified README.md
100644 → 100755
Empty file.
126 changes: 75 additions & 51 deletions config.lua
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,31 @@ lvim.leader = "space"
lvim.colorscheme = "horizon"
vim.opt.scrolloff = 16

require("tokyonight").setup({
-- your configuration comes here
-- or leave it empty to use the default settings
style = "storm", -- The theme comes in three styles, `storm`, `moon`, a darker variant `night` and `day`
light_style = "day", -- The theme is used when the background is set to light
transparent = false, -- Enable this to disable setting the background color
terminal_colors = true, -- Configure the colors used when opening a `:terminal` in Neovim
styles = {
-- Style to be applied to different syntax groups
-- Value is any valid attr-list value for `:help nvim_set_hl`
comments = { italic = true },
keywords = { italic = true },
functions = {},
variables = {},
-- Background styles. Can be "dark", "transparent" or "normal"
sidebars = "dark", -- style for sidebars, see below
floats = "dark", -- style for floating windows
},
sidebars = { "qf", "help" }, -- Set a darker background on sidebar-like windows. For example: `["qf", "vista_kind", "terminal", "packer"]`
day_brightness = 0.3, -- Adjusts the brightness of the colors of the **Day** style. Number between 0 and 1, from dull to vibrant colors
hide_inactive_statusline = false, -- Enabling this option, will hide inactive statuslines and replace them with a thin border instead. Should work with the standard **StatusLine** and **LuaLine**.
dim_inactive = false, -- dims inactive windows
lualine_bold = false, -- When `true`, section headers in the lualine theme will be bold
})

lvim.builtin.terminal.active = true
lvim.builtin.nvimtree.side = "left"
lvim.builtin.nvimtree.setup.view.width = 54
Expand All @@ -28,22 +53,22 @@ lvim.builtin.telescope.defaults.file_ignore_patterns = { "NvimTree", "node_modul
local components = require("lvim.core.lualine.components")

lvim.builtin.lualine.sections.lualine_b = {
{ "filename", file_status = true, newfile_status = false, path = 3, shorting_target = 30 },
components.branch,
{ "filename", file_status = true, newfile_status = false, path = 3, shorting_target = 30 },
components.branch,
}

lvim.builtin.lualine.sections.lualine_y = {
components.location,
components.location,
}

-- automatically close the tab/vim when nvim-tree is the last window in the tab
vim.api.nvim_create_autocmd("BufEnter", {
nested = true,
callback = function()
if #vim.api.nvim_list_wins() == 1 and vim.api.nvim_buf_get_name(0):match("NvimTree_") ~= nil then
vim.cmd("quit")
end
end,
nested = true,
callback = function()
if #vim.api.nvim_list_wins() == 1 and vim.api.nvim_buf_get_name(0):match("NvimTree_") ~= nil then
vim.cmd("quit")
end
end,
})

-- load snippets
Expand All @@ -56,49 +81,48 @@ require("which")
require("cmpMappings")

lvim.plugins = {
{
"nvim-telescope/telescope-file-browser.nvim",
},

{
"SmiteshP/nvim-gps",
requires = "nvim-treesitter/nvim-treesitter",
},
{
"navarasu/onedark.nvim",
},
{
"ThePrimeagen/harpoon",
},
{
"lunarvim/horizon.nvim",
},
{
"jose-elias-alvarez/typescript.nvim",
},
{ "tpope/vim-surround" },
{
"windwp/nvim-ts-autotag",
event = "InsertEnter",
},
{
"p00f/nvim-ts-rainbow",
},
-- { "Pocco81/DAPInstall.nvim", branch = "dev" },
{ "David-Kunz/jester" },
-- { "rcarriga/nvim-dap-ui" },
{
"rmagatti/auto-session",
config = function()
require("auto-session").setup({
log_level = "info",
})
end,
},
{
"nvim-telescope/telescope-file-browser.nvim",
},
{
"SmiteshP/nvim-gps",
requires = "nvim-treesitter/nvim-treesitter",
},
{
"navarasu/onedark.nvim",
},
{
"ThePrimeagen/harpoon",
},
{
"lunarvim/horizon.nvim",
},
{
"jose-elias-alvarez/typescript.nvim",
},
{ "tpope/vim-surround" },
{
"windwp/nvim-ts-autotag",
event = "InsertEnter",
},
{
"p00f/nvim-ts-rainbow",
},
-- { "Pocco81/DAPInstall.nvim", branch = "dev" },
{ "David-Kunz/jester" },
-- { "rcarriga/nvim-dap-ui" },
{
"rmagatti/auto-session",
config = function()
require("auto-session").setup({
log_level = "info",
})
end,
},
}

require("indent_blankline").setup({
filetype = { "yaml", "yml" },
show_current_context = false,
show_trailing_blankline_indent = false,
filetype = { "yaml", "yml" },
show_current_context = false,
show_trailing_blankline_indent = false,
})
Empty file modified ignore
100644 → 100755
Empty file.
Empty file modified lsp-settings/tsserver.json
100644 → 100755
Empty file.
Empty file modified lua/cmpMappings.lua
100644 → 100755
Empty file.
Empty file modified lua/linters.lua
100644 → 100755
Empty file.
88 changes: 45 additions & 43 deletions lua/which.lua
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ lvim.builtin.which_key.mappings.q = { "<cmd>BufferKill<CR>", "Close Buffer" }

-- Lsp
lvim.builtin.which_key.mappings.l.a = { "<cmd>TypescriptRemoveUnused<cr>", "Remove unused variables" }
lvim.builtin.which_key.mappings.l.c = { "<cmd>TypescriptOrganizeImports<cr>", "Organize imports" }
lvim.builtin.which_key.mappings.l.o = { "<cmd>TypescriptAddMissingImports<cr>", "Add missint imports" }
lvim.builtin.which_key.mappings.l.O = { "<cmd>TypescriptAddMissingImports<cr>", "Add missint imports" }
lvim.builtin.which_key.mappings.l.o = { "<cmd>TypescriptOrganizeImports<cr>", "Organize imports" }
lvim.builtin.which_key.mappings.l.R = { "<cmd>TypescriptRenameFile<cr>", "Change file path" }
lvim.builtin.which_key.mappings.l.c = { "<cmd>TypescriptRemoveUnused<cr>", "Remove unused imports" }
lvim.builtin.which_key.mappings.l.F = { "<cmd>TypescriptFixAll<cr>", "Fix all" }
lvim.builtin.which_key.mappings.l.d = { "<cmd>TypescriptGoToSourceDefinition<cr>", "Go to source definition" }
-- lvim.builtin.which_key.mappings.l.h = { "<cmd>TSLspToggleInlayHints<cr>", "Toggle hints" }
Expand All @@ -31,31 +32,31 @@ lvim.builtin.which_key.mappings.b.l = { "<cmd>BufferLineCloseRight<cr>", "Close

-- Treesitter
lvim.builtin.which_key.mappings["T"] = {
name = "Treesitter",
u = { ":TSUpdate<cr>", "Update" },
i = { ":TSConfigInfo<cr>", "Info" },
name = "Treesitter",
u = { ":TSUpdate<cr>", "Update" },
i = { ":TSConfigInfo<cr>", "Info" },
}

-- Treesitter
lvim.builtin.which_key.mappings["h"] = {
name = "Harpoon",
a = { ":lua require('harpoon.mark').add_file()<cr>", "Add file" },
o = { ":lua require('harpoon.ui').toggle_quick_menu()<cr>", "Open Menu" },
k = { ":lua require('harpoon.ui').nav_next() <cr>", "Next" },
j = { ":lua require('harpoon.ui').nav_prev() <cr>", "Prev" },
h = { ":Telescope harpoon marks<cr>", "Search marks" },
name = "Harpoon",
a = { ":lua require('harpoon.mark').add_file()<cr>", "Add file" },
o = { ":lua require('harpoon.ui').toggle_quick_menu()<cr>", "Open Menu" },
k = { ":lua require('harpoon.ui').nav_next() <cr>", "Next" },
j = { ":lua require('harpoon.ui').nav_prev() <cr>", "Prev" },
h = { ":Telescope harpoon marks<cr>", "Search marks" },
}

-- Trouble
lvim.builtin.which_key.mappings["t"] = {
name = "Trouble",
t = { "<cmd>TroubleToggle<cr>", "TroubleToggle" },
r = { "<cmd>TroubleToggle lsp_references<cr>", "References" },
i = { "<cmd>TroubleToggle lsp_implementations<cr>", "Implementations" },
d = { "<cmd>TroubleToggle lsp_definitions<cr>", "Definitions" },
q = { "<cmd>TroubleToggle quickfix<cr>", "Quickfix" },
p = { "<cmd>TroubleToggle lsp_document_diagnostics<cr>", "Document diagnostics" },
w = { "<cmd>TroubleToggle lsp_workspace_diagnostics<cr>", "Workspace diagnostics" },
name = "Trouble",
t = { "<cmd>TroubleToggle<cr>", "TroubleToggle" },
r = { "<cmd>TroubleToggle lsp_references<cr>", "References" },
i = { "<cmd>TroubleToggle lsp_implementations<cr>", "Implementations" },
d = { "<cmd>TroubleToggle lsp_definitions<cr>", "Definitions" },
q = { "<cmd>TroubleToggle quickfix<cr>", "Quickfix" },
p = { "<cmd>TroubleToggle lsp_document_diagnostics<cr>", "Document diagnostics" },
w = { "<cmd>TroubleToggle lsp_workspace_diagnostics<cr>", "Workspace diagnostics" },
}

-- Search
Expand All @@ -64,12 +65,13 @@ lvim.builtin.which_key.mappings.s.f = { "<cmd>Telescope live_grep<cr>", "Grep fi
lvim.builtin.which_key.mappings.s.F = { "<cmd>Telescope find_files<cr>", "Find files" }
lvim.builtin.which_key.mappings.s.m = { "<cmd>Telescope marks<cr>", "Marks" }
lvim.builtin.which_key.mappings.s.e = { "<cmd>Telescope file_browser<cr>", "File browser" }
lvim.builtin.which_key.mappings.s.B = { "<cmd>Telescope current_buffer_fuzzy_find<cr>", "Grep buffer" }
lvim.builtin.which_key.mappings.s.B = { "<cmd>Telescope current_buffer_fuzzy_find<cr>", "Grep current buffer" }
lvim.builtin.which_key.mappings.s.b = { "<cmd>Telescope buffers<cr>", "Find buffer" }
lvim.builtin.which_key.mappings.s.p = { "<cmd>Telescope projects<cr>", "Find in projects" }
lvim.builtin.which_key.mappings.s.S = { "<cmd>Telescope grep_string<cr>", "Grep strig" }
lvim.builtin.which_key.mappings.s.j = {
"<cmd>lua require 'telescope'.extensions.file_browser.file_browser()<cr><cr>",
"File browser",
"<cmd>lua require 'telescope'.extensions.file_browser.file_browser()<cr><cr>",
"File browser",
}
lvim.builtin.which_key.mappings.s.t = nil
lvim.builtin.which_key.mappings.s.k = nil
Expand All @@ -81,8 +83,8 @@ lvim.builtin.which_key.mappings.L.R = { "<cmd>NvimTreeRefresh<cr>", "Refresh Nvi

-- builtin vim
lvim.builtin.which_key.mappings["v"] = {
name = "Search and replace",
f = { ":%s/", "Find each occurrence" },
name = "Search and replace",
f = { ":%s/", "Find each occurrence" },
}

-- Git
Expand All @@ -94,25 +96,25 @@ lvim.keys.normal_mode["("] = "6j"
lvim.keys.normal_mode[")"] = "6k"

lvim.builtin.telescope = {
active = true,
defaults = {
layout_strategy = "horizontal",
layout_config = {
width = 0.99,
height = 0.80,
preview_cutoff = 120,
preview_width = 0.55,
prompt_position = "bottom",
},
},
pickers = {
git_files = {
hidden = true,
},
live_grep = {
hidden = true,
},
},
active = true,
defaults = {
layout_strategy = "horizontal",
layout_config = {
width = 0.99,
height = 0.80,
preview_cutoff = 120,
preview_width = 0.55,
prompt_position = "bottom",
},
},
pickers = {
git_files = {
hidden = true,
},
live_grep = {
hidden = true,
},
},
}

-- lvim.builtin.telescope.pickers.git_files = {
Expand Down
Empty file modified snippets/js.json
100644 → 100755
Empty file.
Empty file modified snippets/package.json
100644 → 100755
Empty file.

0 comments on commit f8b4fe8

Please sign in to comment.