Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(telescope-frecency)!: remove support for sqlite.lua #1019

Merged
merged 2 commits into from
Oct 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions lua/core/options.lua
Original file line number Diff line number Diff line change
Expand Up @@ -121,17 +121,6 @@ local function load_options()
vim.g.python3_host_prog = use_if_defined(vim.g.python3_host_prog, "python3")
end

-- custom sqlite3 provider
local sqlite_clib_path = os.getenv("SQLITE_CLIB_PATH")
if not isempty(sqlite_clib_path) then
-- Try environment variable first
vim.g.sqlite_clib_path = sqlite_clib_path
elseif global.is_windows then
-- Fix sqlite3 missing-lib issue on Windows
-- Download the DLLs form https://www.sqlite.org/download.html
vim.g.sqlite_clib_path = global.home .. "/Documents/sqlite-dll-win64-x64-3400200/sqlite3.dll"
end

for name, value in pairs(require("modules.utils").extend_config(global_local, "user.options")) do
vim.o[name] = value
end
Expand Down
6 changes: 2 additions & 4 deletions lua/modules/plugins/tool.lua
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,10 @@ tool["nvim-telescope/telescope.nvim"] = {
event = { "CursorHold", "CursorHoldI" },
config = require("tool.project"),
},
{ "nvim-telescope/telescope-fzf-native.nvim", build = "make" },
{ "nvim-telescope/telescope-frecency.nvim", dependencies = {
{ "kkharji/sqlite.lua" },
} },
{ "jvgrootveld/telescope-zoxide" },
{ "nvim-telescope/telescope-frecency.nvim" },
{ "nvim-telescope/telescope-live-grep-args.nvim" },
{ "nvim-telescope/telescope-fzf-native.nvim", build = "make" },
},
}

Expand Down
3 changes: 1 addition & 2 deletions nixos/neovim/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ in
patchelf
];
home.extraOutputsToInstall = optional cfg.setBuildEnv "nvim-depends";
home.shellAliases.nvim = optionalString cfg.setBuildEnv (concatStringsSep " " buildEnv) + " SQLITE_CLIB_PATH=${pkgs.sqlite.out}/lib/libsqlite3.so " + "nvim";
home.shellAliases.nvim = optionalString cfg.setBuildEnv (concatStringsSep " " buildEnv) + " nvim";

programs.neovim = {
enable = true;
Expand All @@ -147,7 +147,6 @@ in
[
# Dependent packages used by default plugins
doq
sqlite
]
++ optionals cfg.withBuildTools [
cargo
Expand Down
11 changes: 4 additions & 7 deletions scripts/install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ $REQUIRED_NVIM_VERSION_LEGACY = [version]'0.8.0'
$USE_SSH = $True

# package mgr vars
$choco_package_matrix = @{ "gcc" = "mingw"; "git" = "git"; "nvim" = "neovim"; "make" = "make"; "sudo" = "psutils"; "node" = "nodejs"; "pip" = "python3"; "fzf" = "fzf"; "rg" = "ripgrep"; "go" = "go"; "curl" = "curl"; "wget" = "wget"; "tree-sitter" = "tree-sitter"; "ruby" = "ruby"; "sqlite3" = "sqlite"; "rustc" = "rust-ms" }
$scoop_package_matrix = @{ "gcc" = "mingw"; "git" = "git"; "nvim" = "neovim"; "make" = "make"; "sudo" = "psutils"; "node" = "nodejs"; "pip" = "python"; "fzf" = "fzf"; "rg" = "ripgrep"; "go" = "go"; "curl" = "curl"; "wget" = "wget"; "tree-sitter" = "tree-sitter"; "ruby" = "ruby"; "sqlite3" = "sqlite"; "rustc" = "rust" }
$choco_package_matrix = @{ "gcc" = "mingw"; "git" = "git"; "nvim" = "neovim"; "make" = "make"; "sudo" = "psutils"; "node" = "nodejs"; "pip" = "python3"; "fzf" = "fzf"; "rg" = "ripgrep"; "go" = "go"; "curl" = "curl"; "wget" = "wget"; "tree-sitter" = "tree-sitter"; "ruby" = "ruby"; "rustc" = "rust-ms" }
$scoop_package_matrix = @{ "gcc" = "mingw"; "git" = "git"; "nvim" = "neovim"; "make" = "make"; "sudo" = "psutils"; "node" = "nodejs"; "pip" = "python"; "fzf" = "fzf"; "rg" = "ripgrep"; "go" = "go"; "curl" = "curl"; "wget" = "wget"; "tree-sitter" = "tree-sitter"; "ruby" = "ruby"; "rustc" = "rust" }
$installer_pkg_matrix = @{ "NodeJS" = "npm"; "Python" = "pip"; "Ruby" = "gem" }

# env vars
Expand Down Expand Up @@ -266,7 +266,6 @@ function fetch_deps {
check_and_fetch_exec -PkgName "curl"
check_and_fetch_exec -PkgName "wget"
check_and_fetch_exec -PkgName "rustc"
check_and_fetch_exec -PkgName "sqlite3"
check_and_fetch_exec -PkgName "tree-sitter"

# Reload PATH for future use
Expand Down Expand Up @@ -398,10 +397,8 @@ Please make sure you have nvim v$REQUIRED_NVIM_VERSION_LEGACY installed at the v
}

info -Msg "Spawning Neovim and fetching plugins... (You'll be redirected shortly)"
info -Msg 'To make sqlite work with lua, manually grab the dlls from "https://www.sqlite.org/download.html" and replace'
info_ext -Msg 'vim.g.sqlite_clib_path with your path at the bottom of `lua/core/options.lua`.'
info -Msg 'Also, please make sure you have a Rust Toolchain installed via `rustup`! Otherwise, unexpected things may'
info_ext -Msg 'happen. See: https://www.rust-lang.org/tools/install. ¯¯¯¯¯¯¯¯¯¯¯¯'
info -Msg 'Please make sure you have a Rust Toolchain installed via `rustup`! Otherwise, unexpected things may'
info_ext -Msg 'happen. See: https://www.rust-lang.org/tools/install.¯¯¯¯¯¯¯¯¯¯¯¯'
info_ext -Msg ' ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯'
info -Msg 'If lazy.nvim failed to fetch any plugin(s), maunally execute `:Lazy sync` until everything is up-to-date.'
Write-Host @'
Expand Down
6 changes: 3 additions & 3 deletions tutor/dots.tutor
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ content in the right window and press enter to open it in buffer.
Nvimdots also provide other find features. The most commonly used keymap maybe
`<leader>fr`{normal} if you are used to editing files in different projects. It will
list files you ever opened and sort them by "frecency" which used in firefox's
address bar. This feature utilizes "sqlite" to store the key-value pairs of
file path and its "frecency" value permanently at
**~/.local/share/nvim/file_frecency.sqlite3**.
address bar. This feature uses "Lua Bytecode" to store the key-value pairs of
file path and its "frecency" value permanently at:
**~/.local/share/nvim/file_frecency.bin**.

You can press `<leader>fw`{normal} to search word in current work directory. It
utilizes ripgrep to search and you can use it naturally as you use ripgrep.
Expand Down