mirror of
https://github.com/pojokcodeid/nvim-lazy.git
synced 2025-06-22 08:53:31 +02:00
config v1
This commit is contained in:
parent
c651a8ca42
commit
cc7c63dc46
18 changed files with 186 additions and 374 deletions
|
@ -13,7 +13,7 @@ return {
|
|||
-- get folder name from current directory
|
||||
local _get_folder_name = function()
|
||||
local str = vim.fn.fnamemodify(vim.fn.getcwd(), ":t")
|
||||
return " " .. icons.ui.ProjekFolder .. " " .. str:lower():gsub("^%l", string.upper) .. " "
|
||||
return " " .. str:lower():gsub("^%l", string.upper) .. " "
|
||||
end
|
||||
|
||||
local function diagnostics_indicator(num, _, diagnostics, _)
|
||||
|
@ -53,7 +53,7 @@ return {
|
|||
middle_mouse_command = nil,
|
||||
|
||||
indicator_icon = nil,
|
||||
indicator = { style = "icon", icon = icons.ui.BoldLineLeft },
|
||||
indicator = { style = "icon", icon = "▎" },
|
||||
buffer_close_icon = icons.ui.Close,
|
||||
modified_icon = icons.ui.Circle,
|
||||
close_icon = icons.ui.BoldClose,
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
-- initial gui app
|
||||
local is_neovide = false
|
||||
local use_noice = true
|
||||
-- if vim.g.neovide then
|
||||
-- is_neovide = true
|
||||
-- use_noice = false
|
||||
-- end
|
||||
if vim.g.neovide then
|
||||
is_neovide = true
|
||||
use_noice = false
|
||||
end
|
||||
vim.opt.lazyredraw = is_neovide
|
||||
return {
|
||||
{ "gelguy/wilder.nvim", enabled = not use_noice },
|
||||
|
|
|
@ -131,9 +131,9 @@ return {
|
|||
|
||||
local get_branch = function()
|
||||
if vim.b.gitsigns_head ~= nil then
|
||||
return icons.git.Branch2 .. " " .. vim.b.gitsigns_head
|
||||
return " " .. vim.b.gitsigns_head
|
||||
else
|
||||
return icons.git.Branch2 .. vim.fn.fnamemodify("", ":t")
|
||||
return "" .. vim.fn.fnamemodify("", ":t")
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -205,22 +205,17 @@ return {
|
|||
|
||||
-- Memeriksa apakah baris awal dari fold adalah komentar
|
||||
local start_line = vim.api.nvim_buf_get_lines(0, lnum - 1, lnum, false)[1]
|
||||
-- cari comentar dengan awalan /* untuk generaal comment
|
||||
if start_line:find("^%s*%/%*") then
|
||||
if start_line:find("^%s*%/%*") then -- Regex untuk mengecek komentar javascript
|
||||
is_comment = true
|
||||
-- cara commentar dengan awalan <!-- untuk html
|
||||
elseif start_line:find("^%s*<!--") then
|
||||
is_comment = true
|
||||
-- cari comentar dengan awalan -- untuk lua
|
||||
elseif start_line:find("^%s*%-%-") then
|
||||
is_comment = true
|
||||
end
|
||||
-- cek fold yang berawalan import
|
||||
if start_line:find("^%s*import") then
|
||||
is_import = true
|
||||
end
|
||||
-- cek fold dengan akhiran {
|
||||
if start_line:find("%s*{%s*$") then
|
||||
if start_line:find("%s*{") then
|
||||
is_bracket = true
|
||||
end
|
||||
if is_comment then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue